Commit b93f6e6d authored by Luca Bruno's avatar Luca Bruno

Call g_signal_handlers_destroy on gtypeinstance finalizer

Fixes bug 708130
parent 4e603584
......@@ -1710,6 +1710,13 @@ public class Vala.GTypeModule : GErrorModule {
ccode.add_declaration ("%s *".printf (get_ccode_name (cl)), new CCodeVariableDeclarator ("self"));
ccode.add_assignment (new CCodeIdentifier ("self"), ccast);
if (!cl.is_compact && cl.base_class == null) {
// non-gobject class
var call = new CCodeFunctionCall (new CCodeIdentifier ("g_signal_handlers_destroy"));
call.add_argument (new CCodeIdentifier ("self"));
ccode.add_expression (call);
} else {
var function = new CCodeFunction (get_ccode_lower_case_prefix (cl) + "free", "void");
if (cl.is_private_symbol ()) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment