summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qcache.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools/qcache.h')
-rw-r--r--src/corelib/tools/qcache.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/tools/qcache.h b/src/corelib/tools/qcache.h
index 46e20b1..66f9f73 100644
--- a/src/corelib/tools/qcache.h
+++ b/src/corelib/tools/qcache.h
@@ -70,8 +70,9 @@ class QCache
if (l == &n) l = n.p;
if (f == &n) f = n.n;
total -= n.c;
- delete n.t;
+ T *obj = n.t;
hash.remove(*n.keyPtr);
+ delete obj;
}
inline T *relink(const Key &key) {
typename QHash<Key, Node>::iterator i = hash.find(key);