aboutsummaryrefslogtreecommitdiffstats
path: root/libshiboken/basewrapper_p.h
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-10-17 17:15:37 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:18:23 -0300
commitfaacc898e03e239d6f76ab18ae4cdb4805525b28 (patch)
treecb0a54fc0be6df7b4ca920c45e6d25af2d20a621 /libshiboken/basewrapper_p.h
parentba1e6dfea28a472e4137984581ac96c7486c89b7 (diff)
Don't delete parentInfo when it seens to be useless to avoid crash on garbage collector.
Diffstat (limited to 'libshiboken/basewrapper_p.h')
-rw-r--r--libshiboken/basewrapper_p.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/libshiboken/basewrapper_p.h b/libshiboken/basewrapper_p.h
index e553d8e68..f34e710f9 100644
--- a/libshiboken/basewrapper_p.h
+++ b/libshiboken/basewrapper_p.h
@@ -80,6 +80,14 @@ struct SbkObjectPrivate
Shiboken::ParentInfo* parentInfo;
/// Manage reference counting of objects that are referred but not owned.
Shiboken::RefCountMap* referredObjects;
+
+ ~SbkObjectPrivate()
+ {
+ delete parentInfo;
+ parentInfo = 0;
+ delete referredObjects;
+ referredObjects = 0;
+ }
};
/// The type behaviour was not defined yet