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 | 96a81ace969de29b6394ab46ad2a3188e2e40406 (patch) | |
| tree | 87feb7f6310bb5298bbbfbc0595daf28919ef5c9 | |
| parent | 6e22519bb3ed3acb2f73e2e06125c0aeb9303c5b (diff) | |
| download | scintilla-mirror-96a81ace969de29b6394ab46ad2a3188e2e40406.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 } |
