Re: NSCache objects not being collected under GC?
Re: NSCache objects not being collected under GC?
- Subject: Re: NSCache objects not being collected under GC?
- From: Nick Zitzmann <email@hidden>
- Date: Fri, 19 Aug 2011 13:36:11 -0600
On Aug 19, 2011, at 2:40 AM, email@hidden wrote:
> I don't use NSCache but I have used instruments to effectively debug GC memory collection problems.
> The described rooting behaviour of NSCache sounds peculiar to me.
I just reproduced the problem in another project, so this is probably a GC bug unless someone else knows what's going on. I've filed a bug report.
> What happens if you call -removeAllObjects. Are the cached objects finalised correctly?
> I know this isn't the same as collecting the NSCache instance but at least, as a workaround if the issue persists, you can recycle the NSCache instances.
Yes, they are finalized if the code calls -removeAllObjects instead of removing the dictionary. I guess that'll have to do for now.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
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