Here’s a little more beyond what Maciej said:
On Mar 26, 2009, at 8:27 AM, Patrick Mueller wrote:
I'm familiar from Java JNI and other 'native' bindings for languages
for the needs of 'pinning' objects both to keep them from moving and/
or keep them from being GC'd.
That’s JSValueProtect and JSValueUnprotect.
OTOH, I know there's some kind of Release/Retain dance in the
ObjectiveC world as it relates to the memory management scheme of
using pools to manage memory. Release/Retain could be related to that.
It’s not.
If I'm doing straight up C programming, no Cocoa, or Obj-C stuff at
all, do I need to worry about this stuff at all, or is there a
common pattern I should be using?
Yes, none of this has anything to do with Objective-C.
JSClass, JSContextGroup, JSGlobalContext, JSPropertyNameArray, and
JSString are all reference counted, not garbage collected. The
functions that return these objects follow the The Create Rule,
borrowed from CoreFoundation <http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html
>.
-- Darin
_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev