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

awakeAfterUsingEncoder:


  • Subject: awakeAfterUsingEncoder:
  • From: Pete Yandell <email@hidden>
  • Date: Sat, 28 Sep 2002 13:27:04 +1000

The docs for awakeAfterUsingCoder: say:

This method can be used to eliminate redundant objects created by the
coder. For example, if after decoding an object you discover that an
equivalent object already exists, you can return the existing object.
If a replacement is returned, your overriding method is responsible for
releasing the receiver.

The question is, am I also responsible for retaining the object that I
substitute in place of the existing object?

I certainly seem to end up with my object's retainCount one too low if
I don't, but there's a lot of other stuff going on and I could be
mucking up the memory management elsewhere. Anybody out there with
experience in this who can confirm or deny my theory?

Pete Yandell
http://pete.yandell.com/
_______________________________________________
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: IntraApp Communication....
  • Next by Date: Re: IntraApp communication....
  • Previous by thread: Re: AddressBook: getting "address format"
  • Next by thread: Newbie: Exporting symbols - how?
  • Index(es):
    • Date
    • Thread