Hi Nimish,
For memory management of objects in JSCore, the best reference is here:
Of particular interest to you;
"Core Foundation functions have names that indicate when you own a returned object:
Object-creation functions that have �Create� embedded in the name;
Object-duplication functions that have �Copy� embedded in the name."
So, a string created with JSValueToStringCopy does belong to you, and does need to be released once you have finished with it
Hope that helps.
Alli
I am extending The _javascript_ Core using the JSCore FrameWork Reference
given by Apple. (
http://developer.apple.com/library/mac/#documentation/Carbon/Reference/WebKit_JavaScriptCore_Ref/index.html
)
As of now its working fine but I have certain doubts.
1) I am using JSValueToStringCopy to create a new JSStringRef from the
JSValueRef. Now what i observe is when i run this command in a loop
(requirement to get many values)
the memory location of JSStringRef keeps on changing whereas if i use
JSStringRelease Function at the end of that loop the memory location remains
constant.
Is JSStringRelease required ? Am i wasting memory in the first case.. ? It
does not give an error so it means that the memory is being managed.. but I
am worried if its managed properly or not.
_______________________________________________ webkit-help mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-help
