realbasic-nug
[Top] [All Lists]

Re: Dangerous deallocation/circular reference...

To: REALbasic Network Users Group <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Dangerous deallocation/circular reference...
From: Brady Duga <duga at ljug dot com>
Date: Thu, 11 Jul 2002 14:31:00 -0700

On Thursday, July 11, 2002, at 02:24  PM, Mars Saxman wrote:

duga at ljug dot com wrote:

Question is, when one of them passes
away while the other is talking to it, will I have problems?

That can't happen. An object is implicitly locked as long as one of its
methods is executing. (Self and Me count as references.)

So the references exist even when the current point of execution is not in a method of the object in question, but rather in some other object that was called by the Object in question? So, the code currently executing is Tickled.Tickle, called from Tickler.Action. Since I am now in Tickled, which has a reference from Tickler, Self and Me (3 references), does Tickler also have 3 references (one from Tickled, 2 from it's local versions of Self and Me)? I suppose that makes sense, since Tickler.Action hasn't gone out of scope yet... Does every method get it's own local copy of Self and Me?

--Brady
The La Jolla Underground



<Prev in Thread] Current Thread [Next in Thread>