VCursor_Destructor

Ivan Smahin ivan_smahin at paradigmasoft.com
Mon Dec 15 07:23:50 CST 2014


On Dec 15, 2014, at 12:12, Mark Schonewille <m.schonewille at economy-x-talk.com> wrote:

> Hi,
> 
> I'm working on a LiveCode app. How important is VCursor_Destructor()? I've noticed that, in an app I'm working on, VCursor_Destructor() wasn't called. I'm fixing this whenever I notice that it isn't called after a cursor is created, but I don't see any difference, whether it is called or not.
> 
> I assume that closing a connection destroys all cursors and since a connection is closed automatically after 15 minutes, it doesn't matter much anyway, unless you're issuing really large queries. Is this correct?
> 
> Is memory maintenance really the only reason to destroy a cursor?
> 

Yes, all existing cursors will be freed on connection.close, but there are few reasons (probably not a complete list) to do it as early as you finish using it:

- free internal record-locks in case of server-side cursor;
- free memory (cursor, it's cached records ...);
- code-writing accuracy;


-- 
Best regards,
Ivan Smahin
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com



More information about the Valentina mailing list