[V4MD] VCursor life
Ruslan Zasukhin
sunshine at public.kherson.ua
Sun Mar 16 10:03:27 CST 2003
on 3/16/03 4:17 AM, Gunnar Swan at GunnarSwan at practicetopass.com wrote:
>
> Director ...
>
> ---------- start snippet
> on SomeHandler me
> set ResponseCursor = new ("VCursor", UsageReference, tmpSELECT)
> end
> ---------------- end snippet
>
> The handler above declares a variable with an instance of the vCursor.
> Normally, I will kill the cursor with
>
> --------------start snippet
> on SomeHandler me
> set ResponseCursor = new ("VCursor", UsageReference, tmpSELECT)
> set ResponseCursor = VOID -- << Kill cursor
> end
> ----------------end snippet
>
> Well ... I didn't do this on one occasion, the cursor was 'alive' with the
> name 'ResponseCursor'
>
> In the debugger, I went into another handler, and just happen to have a
> variable named 'ResponseCursor'/
> I was getting an instance of a cursor from another handler BEFORE the
> declaration in the current handler.
>
> This is why it is so important to kill a cursor with Cursor = VOID. And I
> normally do.
Hmm, I was sure that in Lingo if you NOT declare variable to be global then
it must be local and must be destroyed by Director on exit of handler...
No???
> But my question is ....
>
> Should not the cursor 'die' at the end of the handler ?
I wonder also on this!!!
Of course here works garbage collector of Director.
In fact they do not promise kill object as soon as it is out of scope.
But the main problem which I see here is:
why other handler do not see EMPTY/ZERO/VOID value for its own local
variable ???
> Is it possible that Director is not garbage collecting and for some reason the
> cursor is alive outside of the handler in which it is declared ?
Gunnar, may be it is really declared as global ?
> What is the rule of the life of the cursor outside of the local declaration in
> the handler ?
This is not MY rules. Here work Director.
I cannot change anything inside of Director.
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://listserv.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina
mailing list