• 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: Factory AutoRelease
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Factory AutoRelease


  • Subject: Re: Factory AutoRelease
  • From: j o a r <email@hidden>
  • Date: Sun, 4 May 2003 23:56:49 +0200

You know it's autoreleased because that is how Cocoa works. If you don't use "alloc*", "copy*" or "new" then you aren't responsible for releasing the object == it is returned to you autoreleased. Factory class methods always returns autoreleased objects.

Had I not been in such a good mood I would have told you to R the (F)M... :)

j o a r

On Sunday, May 4, 2003, at 23:45 Europe/Stockholm, Bryan Rieger wrote:

How can you tell if an object created by a class factory method calls
autorelease on an object before it returns it to the caller. ie

myScanner = [NSScanner scannerWithString: aString];

is myScanner already in the autorelease pool?
_______________________________________________
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.

References: 
 >Factory AutoRelease (From: Bryan Rieger <email@hidden>)

  • Prev by Date: Re: Factory AutoRelease
  • Next by Date: Re: Cocoa - Naive questions about memory
  • Previous by thread: Re: Factory AutoRelease
  • Next by thread: Re: Factory AutoRelease
  • Index(es):
    • Date
    • Thread