Re: NSBezierPath
Re: NSBezierPath
- Subject: Re: NSBezierPath
- From: Shawn Erickson <email@hidden>
- Date: Thu, 1 Aug 2002 08:58:21 -0700
On Thursday, August 1, 2002, at 03:51 AM, Smith, Bradley wrote:
Hi everyone,
Am I right in thinking the following should work:-
NSBezierPath *thePath = [NSBezierPath bezierPath];
You need to retain it and [auto]release it when done. The object you
get from bezierPath is already autoreleased.
If you used [[NSBezierPath alloc] init] (or copy) you would be creating
the object yourself and hence would need to release it when done. When
using a helper method like bezierPath that method is allocating the
path an it is its responsibility to release it but also it has a
responsibility to had you back a valid path... so it autoreleases the
instance before handing it back.
-Shawn
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.