Re: Garbage collector vs variable lifetime
Re: Garbage collector vs variable lifetime
- Subject: Re: Garbage collector vs variable lifetime
- From: "Hamish Allan" <email@hidden>
- Date: Tue, 10 Jun 2008 21:17:43 +0100
On Tue, Jun 10, 2008 at 4:28 PM, Charles Srstka
<email@hidden> wrote:
> I think the problem is that if NSArray has +[NSArray array] returning an
> NSArray, then NSMutableArray has to return an NSArray also, since it can't
> have a different method signature for the same method. As a result, if you
> called +[NSMutableArray array], the compiler would think you were getting a
> regular, non-mutable NSArray, and you'd get a warning if you tried to do
> this, although the code would still work:
>
> NSMutableArray *array = [NSMutableArray array];
Ah, yes, so you would. I see!
Hamish
_______________________________________________
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