Local / lazy referencing

Charles Goodwin <[email protected]> Thu, 02 Oct 2003 12:10:48 +0100
Newsgroups gmane.comp.java.xwt.widgets
Organization XWT Foundation
Message-ID <[email protected]>
Is this going to work:
> Press1 += function() {
>     if ( enabled ) {
>         activated = true;
> 
>         relref = function() {
>             // clean up
>             activated = false;
>             root.Release1 -= relref;
>         }
> 
>         root.Release1 += relref;
>     }
> }

Since the reference is only created in the Press1 trap, will it still be 
around to be removed in the Release1 trap?

- Charlie