All
I have several cases of the following pattern in my code:
- (void)start
{
[[Something alloc] initWithDelegate:self];
}
- (void)finishWithSomething:(Something*)something
{
[something release];
}
The intent of course is that the Something object calls back the
caller with
On Oct 10, 2009, at 2:25 AM, Glen Low wrote:
Not necessarily. In a pathological but presumably legit case,
whatever happens in initDelegate: might only form a weak reference
to the Something object, thus the Something object would be subject
to GC.
That's true, although unlikely. In
On 10/10/2009, at 12:29 PM, Jens Alfke wrote:
On Oct 8, 2009, at 7:33 PM, Glen Low wrote:
1. The code is not GC friendly as between the end of start and the
beginning of finishWithSomething, there are no references to the
object, so it may be collected.
There must be references to it;
On Oct 8, 2009, at 7:33 PM, Glen Low wrote:
1. The code is not GC friendly as between the end of start and the
beginning of finishWithSomething, there are no references to the
object, so it may be collected.
There must be references to it; otherwise how would that object's
methods get
Hi All
I have several cases of the following pattern in my code:
- (void)start
{
[[Something alloc] initWithDelegate:self];
}
- (void)finishWithSomething:(Something*)something
{
[something release];
}
The intent of course is that the Something object calls back the
caller