Skip to content

Commit

Permalink
Call g_signal_handlers_destroy on gtypeinstance finalizer
Browse files Browse the repository at this point in the history
Fixes bug 708130
  • Loading branch information
Luca Bruno committed Jun 27, 2014
1 parent 4e60358 commit b93f6e6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions codegen/valagtypemodule.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()) {
Expand Down

0 comments on commit b93f6e6

Please sign in to comment.