At 9:44 -0700 19/09/01, Thomas Higgins wrote:
>All,
>I'm jumping in way late here but I thought I'd throw this out there, 
>the definition of "forget()" in the Lingo Dictionary (I just 
>double-checked the D8.5 docs for this quote):
>
>This timeout object function removes the given timeoutObject from 
>the timeoutList, and prevents it from sending further timeout events.
>
>
>Notice that this definition says nothing about whether or not the 
>item is cleared from memory, it is only removed from the timeout 
>list preventing it from recieving it's periodic events. Therefore if 
>you really want to remove it from memory then you must remove all 
>valid pointers to the object as with all other objects, meaning you 
>have to VOID any references to the timeout object.
>
>Does that make sense or do you still think there's a bug in here 
>somewhere? I'm going to scan over this thread to make sure I haven't 
>missed something but after reading the last two or three posts I 
>thought I'd share the above.

Thanks.
I just did some tests with timeOutObjects and MIAWs. (Here also 
referred to as "objects")
I must say, that I am quite surprised about the actual meaning of the 
"forget" function.
I guess, I always believed "forget" to mean the same as "destroy", in 
the sense that the forgotten object was actually internally 
dismantled, as I do with my own objects during destruction, but this 
seems not to be the case.

"forget" removes an object from the list it was automatically placed 
in when it was created, and in the case of the MIAW, at least also 
removes the window from visibility.
But the object is still just as much alive and kicking, as it was 
before it was forgotten, and in fact you can "moveTofront" a 
forgotten MIAW, provided you kept a reference outside the windowList.

You can still access the "targetObject" of a timeoutObject, even 
after it has been forgotten, and you can verify that the refCount of 
the targetObject, still reflects the reference by the timeoutObject.

Both timeoutObjects and MIAWs, keep their references to other objects 
until they are themselves garbageCollected, which happens, according 
to the usual rules - when all references are cleared... NOT when they 
are forgotten.

So you don't completely "forget" an object, you only tell the engine 
to forget it's automatic references to the object, so any other 
references you may have created, still "remembers".

It's not a bug, and it's not a problem, "forget" is simply a somewhat 
misleading or confusing term.

The operational information is that if you follow the ordinary rules 
for reference-count and garbage-collection, then every should work as 
expected.

Regards, jakob

[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to