diff options
author | Peter Powell <petpow@saberuk.com> | 2019-08-13 13:35:05 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2019-08-13 15:02:25 +0100 |
commit | 0827c5c7425a17b6a569a9f706b5b3dea8fa345a (patch) | |
tree | 0e8ce47f63feed43378fdc14cc656b8e1edaf98d /include | |
parent | 703ba72071b970caaa7554b1e58a13def57694dc (diff) |
Free StringExtItem and SimpleExtItem values correctly.
Diffstat (limited to 'include')
-rw-r--r-- | include/extensible.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/include/extensible.h b/include/extensible.h index 0efb1db5f..c24984f26 100644 --- a/include/extensible.h +++ b/include/extensible.h @@ -210,22 +210,19 @@ class SimpleExtItem : public ExtensionItem { T* ptr = new T(value); T* old = static_cast<T*>(set_raw(container, ptr)); - Del del; - del(old); + free(container, old); } inline void set(Extensible* container, T* value) { T* old = static_cast<T*>(set_raw(container, value)); - Del del; - del(old); + free(container, old); } inline void unset(Extensible* container) { T* old = static_cast<T*>(unset_raw(container)); - Del del; - del(old); + free(container, old); } void free(Extensible* container, void* item) CXX11_OVERRIDE |