How to close or terminate a gliderecord

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2017 01:23 AM
I wondering if there is some way to clean up the gliderecords as i go forward in my scripts.
I'm currently working on some UI pages, and to get te data I need I have to ask e few (some times a lot) different query's towards different tables in the database. SOme times the are up in the tens of thousands of rows.
Not huge amounts of data but anyhow.
Java is not my strongest of fields, I'm more of a VB scripter from the beginning. And I'm use to clean up and close down FSO and or dataSetRecords after I'v collected my data.
I'v checked the Wiki for GlideRecord but not found a close function. So how to close my connection and free up the memory. This is not an issue now, but perhaps in the future when the amounts of data grows for us.
There is no cloud.
Just some one else's computer.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2017 02:29 AM
Hi Stewe,
As per my understanding, Gliderecord is a java class and we use it's method to perform operations on database. I believe in all the methods (query, update, get, delete, etc.) of the gliderecord they are doing this opening connection and closing connection at their own. You need not to worry about that.
Hope this helps.
Regards
Ujjawal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2017 03:15 AM
But even if you close the connection, you still have all the data that you asked for in your insance of the GlideRecord class.So how do you purge that
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2017 03:20 AM
e.g. var gr = new GlideRecord('incident');
gr.query();
then if if you want to empty that variable you could do gr = "";
But its not something you'll ever have to do, I wouldn't worry about that.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2017 03:25 AM
Thanks.
Ill try to work around that mentally then, old habits are hard to kill .
/Stewe