This is not what i want. I just want to avoid memory leaks.
With JSGarbageCollect is a little better, but not perfect.
I'll try to explain my scenario, maybe this will help.
I extended GTKLauncher to provide aditional JavaScript objects.
Actually i create two objects:
One with JSObjectMake(),
Nov 26, 2008, в 12:23 PM, Iulian написал(а):
With JSGarbageCollect() the finalize() function of myStaticObject gets
called, but the finalize() function of myDynamicObject doesn't get
called.
Perhaps the address of myDynamicObject is on the stack when you call
JSGarbageCollect()? That
Ok. That doesn't help me.
I never call JSValueProtect() to prevent the object from being destroyed.
Iulian
Alexey Proskuryakov-4 wrote:
Perhaps the address of myDynamicObject is on the stack when you call
JSGarbageCollect()? That would prevent it from being collected, of
course.
JavaScript objects and the JavaScriptCore API objects (except
JSStringRef) are garbage collected. So sometime after the last
reference goes away, they will release their memory.
In this case when the global object goes away. If you want to
release them, you can call JSObjectDeleteProperty
4 matches
Mail list logo