On Mar 11, 2009, at 10:03 AM, Robert Mullen wrote:

As I have waded into the code a little more I see that this entire struct is allocated using calloc() in an init and freed with free(). How does that work with GC?


The GC only manages memory that's allocated from the managed heap, and this is separate from the standard malloc zone. If you're using regular malloc, you're on the hook for managing that memory completely manually. Note though, that you can also allocate raw buffers of data from the managed heap using NSAllocateCollectable.

j o a r


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to