Re: Memory management with arrays
Re: Memory management with arrays
- Subject: Re: Memory management with arrays
- From: ss2 cire <email@hidden>
- Date: Sat, 9 Feb 2008 22:57:39 -0800
yay, one i THINK i can answer =)
I thought NSArray already automatically retained all objects that were
added to it?
then once the array is released (dealloced?) the objects within are
released as well
so you may only need to just send it an auto released object
so...
void foo()
{
[array removeAllObjects];
Bar *bar = [[Bar alloc] init];
[array addObject:bar];
}
that should work fine, shouldn't it?
please correct me if I'm wrong.
regards
Eric
_______________________________________________
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