From 1deb5cd9586c80fb899823cb2c942b268ed4ae80 Mon Sep 17 00:00:00 2001 From: lloyd Date: Fri, 6 Jan 2012 14:46:28 +0000 Subject: Use initializer list, make destructor virtual --- src/alloc/secmem.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/alloc/secmem.h') diff --git a/src/alloc/secmem.h b/src/alloc/secmem.h index d07aa949f..df538c54d 100644 --- a/src/alloc/secmem.h +++ b/src/alloc/secmem.h @@ -164,9 +164,9 @@ class MemoryRegion */ void swap(MemoryRegion& other); - ~MemoryRegion() { deallocate(buf, allocated); } + virtual ~MemoryRegion() { deallocate(buf, allocated); } protected: - MemoryRegion() { buf = 0; alloc = 0; used = allocated = 0; } + MemoryRegion() : buf(0), alloc(0), used(0), allocated(0) {} /** * Copy constructor -- cgit v1.2.3