demallien at me.com
Thu Dec 23 07:06:55 PST 2010
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.
On 23 Dec, 2010,at 04:00 PM, webkit-help-request at lists.webkit.org wrote:
given by Apple. (
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
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-help