Re: NSBezierPath EXC_BAD_ACCESS issues.
Re: NSBezierPath EXC_BAD_ACCESS issues.
- Subject: Re: NSBezierPath EXC_BAD_ACCESS issues.
- From: Graham Cox <email@hidden>
- Date: Thu, 4 Mar 2010 00:22:28 +1100
On 04/03/2010, at 12:14 AM, Billy Flatman wrote:
> I'm new to Objective-C as you've probably gathered and am not 100% about how the memory management works. Will I be causing a memory leek with the line:
> path = [[NSBezierPath alloc] bezierPath];
> within my initialiseBezierPath method?
>
Well, it won't work because -bezierPath isn't an instance method of NSBezierPath, it's a class method.
Take a step back, read this. And then again. Until it clicks.
http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmRules.html
--Graham
_______________________________________________
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