Re: How to allocate and delegate; or how to keep GC and the static analyzer happy
Uli Kusterer <[email protected]>
| Newsgroups | gmane.comp.macosx.devel |
|---|---|
| Message-ID | <[email protected]> |
On 09.10.2009, at 12:27, Glen Low wrote: > Of course I could keep a reference to the something object in a > field of the calling object, but I was hoping to avoid that -- the > calling object may invoke start multiple times before each > finishWithSomething:. Add it to an NSMutableArray that is in an ivar (runningSomethings, currentSomethings, or whatever) ? That way you're retaining it, and if you code should e.g. need to cancel it (when it is dealloced), it can do so by just canceling all the items in the array. Cheers, -- Uli Kusterer "The witnesses of TeachText are everywhere..."