Re: GC and malloc question
Re: GC and malloc question
- Subject: Re: GC and malloc question
- From: Sean McBride <email@hidden>
- Date: Thu, 31 May 2012 13:20:06 -0400
- Organization: Rogue Research Inc.
On Thu, 31 May 2012 20:59:07 +0530, Nick Rogers said:
>My question is: will GC affect the node allocations in anyway and,
>also (GC or No GC) will the tree starting from a root node able to
>stay in memory until I free it.
>Because I'm getting EXC_BAD_ACCESS/KERN_PROTECTION_FAILURE, one after
>the other.
Are you storing Obj-C objects in your malloc'ed memory? Because the collector does not track malloc'ed memory and may think your objects are not-rooted and thus get collected before you want. If so, you could use NSAllocateCollectable with NSScannedOption instead of malloc.
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden