diff options
author | Thomas Martitz <thomas.martitz@student.htw-berlin.de> | 2013-11-14 09:36:19 +1100 |
---|---|---|
committer | Thomas Martitz <thomas.martitz@student.htw-berlin.de> | 2013-11-14 09:36:19 +1100 |
commit | 78a5bcfb660421f627449b3d9e252477e838e11b (patch) | |
tree | 0f8337faeb6e3136d5de326cf7519311e3536ca2 | |
parent | b645742ccb6f03c3e631f61910668c6ef248d607 (diff) | |
download | scintilla-mirror-78a5bcfb660421f627449b3d9e252477e838e11b.tar.gz |
ScintillaGTK: Call superclass finalize() in ScintillaObject
The ScintillaObject class does not chain up to its superclass in the finalize()
function. This is a bug and must be done according to the GLib/GObject
documentation. One effect of this is that the destroy notifiers supplied in
e.g. g_object_set_data_full() are never run.
Fixes Bug: #1549 ScintillaObject.finalize() does not chain up
-rw-r--r-- | gtk/ScintillaGTK.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index fa108bac3..3a403ac7e 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -2355,6 +2355,10 @@ void ScintillaGTK::Destroy(GObject *object) { delete sciThis; scio->pscin = 0; + // Always chain up to the parent class + GType parent_type = g_type_parent(scintilla_get_type()); // GTK_TYPE_CONTAINER + GObjectClass *parent = G_OBJECT_CLASS(g_type_class_peek(parent_type)); + parent->finalize(object); } catch (...) { // Its dead so nowhere to save the status } |