Setting VCursor to nil

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Apr 28 00:36:37 CDT 2006


On 4/27/06 11:18 PM, "Brendan Murphy" <bmurf at comcast.net> wrote:

Hi Brendan,

> Page 138 in the V4RB reference it says, "Note: When finished with
> a cursor, you must assign it the value nil to destroy it and free
> memory." 

> Ordinarily under REALbasic you do not have to set items
> to nil to free them because when they go out of scope they are
> freed automatically.

Right. 

> Can you clarify why this is stated for VCursor. Is there a problem with the
> plugin that requires us to set it to nil?
> 
> Does this apply to creating cursors using the SQLSelect method?

Yes

It is mentioned because exists MORE complex case-sensitive than just exit
from function.

You can for example have big function, and you MAY KNOW that starting from
middle of this function you do not need cursor any more. So it is GOOD IDEA
to release it asap.

Or even more complex - inside of single function you build few cursors.
This is why it is mentioned

For simple case YES you can do not null. But simple case today tomorrow can
become complex...and you may miss this moment.


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list