On Sat, Jul 26, 2008 at 4:44 PM, Daniel Richman
<[EMAIL PROTECTED]> wrote:

> Now let us suppose that I have a class Foo with instance variables V1 and V2
> (ints). If I were to create a class method:
>
> + (Foo *)fooWithV1:(int)a V2:(int)b {
>
> Foo *newFoo = [[Foo alloc] init];
> [newFoo setV1:a];
> [newFoo setV2:b];
>
> return newFoo;
> }
>
> then I should also put, just before [return newFoo];, [newFoo autorelease];.

Yes.

-- 
Clark S. Cox III
[EMAIL PROTECTED]
_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [EMAIL PROTECTED]

Reply via email to