• 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: Making an object release itself?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making an object release itself?


  • Subject: Re: Making an object release itself?
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Wed, 31 Dec 2008 18:38:45 +0100


Le 31 déc. 08 à 18:28, Matt Neuburg a écrit :

On Wed, 31 Dec 2008 14:28:44 +1100, Jacob Rhoden <email@hidden >
said:
I'm thinking PostReader class could have a static function that
initialises a new PostReader object, tells it to start the work, and
then do a [self release] after it has called the callback function
'postsRead';

There is certainly nothing wrong, on the face of it, with an object telling
itself to release. This is quite common for singleton and temporary objects
(just what you're dealing with). m.

Just take care to call release at the very end. Once release is called, accessing an ivar may crash your app.


_______________________________________________

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


References: 
 >Re: Making an object release itself? (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Re: modifier key query
  • Next by Date: Re: Storing NSDocument data in packages/bundles
  • Previous by thread: Re: Making an object release itself?
  • Next by thread: Initial Prefs Setting Of Checkbox?
  • Index(es):
    • Date
    • Thread