summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-07-31 23:07:54 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-08-03 12:14:57 (GMT)
commit7e0b201285c712a3c98c848033bbd8e5ab75a590 (patch)
treed4594a747ccc01245a4ab9e52aa0653eb3701337 /src
parent788a33f7a061552e3f9e5d2fe6cf7faad516892e (diff)
downloadQt-7e0b201285c712a3c98c848033bbd8e5ab75a590.zip
Qt-7e0b201285c712a3c98c848033bbd8e5ab75a590.tar.gz
Qt-7e0b201285c712a3c98c848033bbd8e5ab75a590.tar.bz2
Don't forget to delete the deleter object too in QSharedPointer.
Destructors have to be run for the subobjects we initialise. Reviewed-By: Bradley T. Hughes
Diffstat (limited to 'src')
-rw-r--r--src/corelib/tools/qsharedpointer_impl.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h
index aa71168..55aeb10 100644
--- a/src/corelib/tools/qsharedpointer_impl.h
+++ b/src/corelib/tools/qsharedpointer_impl.h
@@ -210,6 +210,9 @@ namespace QtSharedPointer {
{
Self *realself = static_cast<Self *>(self);
executeDeleter(realself->extra.ptr, realself->extra.deleter);
+
+ // delete the deleter too
+ realself->extra.~Next();
}
static inline Self *create(T *ptr, Deleter userDeleter)