aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-01-06 14:46:28 +0000
committerlloyd <[email protected]>2012-01-06 14:46:28 +0000
commit1deb5cd9586c80fb899823cb2c942b268ed4ae80 (patch)
treec767462f693155d534a1690f477704f3ddd9438d /src
parent9f5c73d78fd709c5ab3890bd280c43449fde9195 (diff)
Use initializer list, make destructor virtual
Diffstat (limited to 'src')
-rw-r--r--src/alloc/secmem.h4
1 files changed, 2 insertions, 2 deletions
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<T>& 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