• 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: simple question about passing around pointers to objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: simple question about passing around pointers to objects


  • Subject: Re: simple question about passing around pointers to objects
  • From: Andy Lee <email@hidden>
  • Date: Fri, 27 Jun 2008 16:43:35 -0400

On Jun 27, 2008, at 4:22 PM, Paul Archibald wrote:
I am reading the Hillegass book, but I don't really see an example of what I am tryng to do, although it seems like a very basic question.
[...]
But, as I have been trying to make an exhaustive test of what "works" and what "crashes", I realize that just experimenting with this is not enough, and I need a better theoretical understanding of this stuff.

Programming by guesswork is a recipe for programs that don't work and are unmaintainable. And memory management is an especially bad topic to guess about.


The Hillegass book is actually *full* of examples of what you're trying to do, which is create and use an object. Find the section that explains retain and release and study it again. In the latest edition it's around page 46.

If you recognize this pattern and can tell me where to read more on it, that would be great, too.

Start here:

<http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/index.html >

--Andy

_______________________________________________

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: 
 >simple question about passing around pointers to objects (From: Paul Archibald <email@hidden>)

  • Prev by Date: Re: Extent of NDA concerning iPhone
  • Next by Date: Re: simple question about passing around pointers to objects
  • Previous by thread: simple question about passing around pointers to objects
  • Next by thread: Re: simple question about passing around pointers to objects
  • Index(es):
    • Date
    • Thread