FROM : Andy Lee
DATE : Fri Jun 27 22:43:35 2008
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
DATE : Fri Jun 27 22:43:35 2008
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
| Related mails | Author | Date |
|---|---|---|
| Paul Archibald | Jun 27, 22:22 | |
| Andy Lee | Jun 27, 22:43 | |
| Rob Ross | Jun 27, 23:41 | |
| Daniel Richman | Jun 28, 02:19 | |
| Clark Cox | Jun 28, 02:59 | |
| Graham Cox | Jun 28, 06:21 | |
| Graham Cox | Jun 28, 06:29 |






Cocoa mail archive

