obuchtala / swig

Branch for the development of SWIG's javascript target (v8 and jsc)
https://github.com/swig/swig
Other
25 stars 14 forks source link

JSCore finalize bug (it's leaking) #36

Closed ewmailing closed 10 years ago

ewmailing commented 10 years ago

There is a (regression?) bug where the finalizer was using the classDefinition instead of the objectDefinition which results in no structs (and also presumably classes) from ever being cleaned up.

This seems to be a regression because I originally added this code (because there used to be no finalizer), and I have old generated code that used objectDefinition correctly. I think things were lost in the rebase.

In Lib/javascript/jsc/javascriptcode.swg $jsmangledname_classDefinition.finalize = $jsdtor;

should be: $jsmangledname_objectDefinition.finalize = $jsdtor;

obuchtala commented 10 years ago

Fixed via b4534a481aa370a58d376522ea67072fcc446d8f and fcb48336605474e97e73ca2bc89076ee01e0b8fa