• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSBezierPath
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: Accessing "current document" when not the frontmost application
  • Next by Date: Re: 2 classes
  • Previous by thread: NSBezierPath
  • Next by thread: NSBezierPath
  • Index(es):
    • Date
    • Thread