Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: widget plugin with network access



Hmm.. perhaps JavaScript HAS a GarbageCollector.
But it also has a "delete" command. I've tried anything. delete, set all variables to null.
Nothing works. It seems to me like a real memory leak. But I can't isolate it.
I've attached my TestWidget. It has a function that reads an XML file (a Property List included in the widget).
Then It pares it and gets the key names.
Perhaps its my traversing solution that causes that problem.
Just click on the function ten times and look on Activity Monitor as the memory usage increases with each click.


It really IS just the memory problem.
Noone wants to use a Widget that uses 5 times the memory of the Application it replaces.


Thanks for helping.

Michael


Attachment: TestWidget.wdgt.zip
Description: Zip archive



Am 27.08.2006 um 18:38 schrieb Joshua Scott Emmons:

Since JavaScript has not GarbageCollector or other mechanism to free up memory

Of course it does. <http://en.wikipedia.org/wiki/JavaScriptCore>

Granted, documentation is thin on the ground. But to be fair, you can look at the source of the implementation:
<http://trac.webkit.org/projects/webkit/browser/trunk/ JavaScriptCore/kjs/collector.cpp>


Maybe someone familiar with JavaScriptCore's garbage collection/ reference counting scheme will share some pointers and gottchas with us? Otherwise, I check to make sure you're setting all your references to null before diving in to making a cocoa plugin (if that is the only reason you're making a plugin).

Cheers,
-Joshua Emmons


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Dashboard-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/dashboard-dev/email@hidden

This email sent to email@hidden

References: 
 >widget plugin with network access (From: Michael Kwasnicki <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.