Re: Memory management of C arrays in objects
Re: Memory management of C arrays in objects
- Subject: Re: Memory management of C arrays in objects
- From: Nir Soffer <email@hidden>
- Date: Sun, 16 Dec 2007 22:26:06 +0200
On Dec 16, 2007, at 22:05, Jason Horn wrote:
If I have a class that contains several large C arrays, do I have
to free them in a dealloc method in the class, or do they get freed
automatically when the object is freed? If not, what's the right
syntax for freeing a C array?
You have to free the memory you allocated. If you used malloc() to
get the memory, use free().
Best Regards,
Nir Soffer
_______________________________________________
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