[webkit-dev] how to destroy JSObjescts?
iliescu.iulian at gmail.com
Tue Nov 25 23:47:08 PST 2008
The class definition of my object has initialize() and finalize().
When i load the page that contains "MyObject obj= new MyObject();" the
object is constructed and the initialize() is called. Unfortunatelly this
object is never garbage collected (not even when the browser is closed).
I tried putting JSObjectDeleteProperty but nothing changed.
Timothy Hatcher wrote:
> 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 to remove the
> You also need to call JSStringRelease here when you are done with the
> jsstr variable.
> On Nov 25, 2008, at 8:05 AM, Iulian wrote:
>> I create several JSObjects like this:
>> js_object= JSObjectMakeConstructor(context, object_jsclass,
>> globalObject = JSContextGetGlobalObject(context);
>> jsstr = JSStringCreateWithUTF8CString("MyObject");
>> JSObjectSetProperty(context, globalObject, jsstr, js_object,
>> kJSPropertyAttributeNone, NULL);
>> The problem is that the objects are never destroyed.
>> What can i do to release all these objects?
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
View this message in context: http://www.nabble.com/how-to-destroy-JSObjescts--tp20684186p20696211.html
Sent from the Webkit mailing list archive at Nabble.com.
More information about the webkit-dev