]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Call g_signal_handlers_destroy on gtypeinstance finalizer
authorLuca Bruno <lucabru@src.gnome.org>
Fri, 27 Jun 2014 15:14:39 +0000 (17:14 +0200)
committerLuca Bruno <lucabru@src.gnome.org>
Fri, 27 Jun 2014 18:17:38 +0000 (20:17 +0200)
Fixes bug 708130

codegen/valagtypemodule.vala

index 3dc3729f70f4deaff7036d925217c179e2d16c5e..02c5b6e5c279a17435fc9e2c8334266a66e31591 100644 (file)
@@ -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 ()) {