The CreatorCon Call for Content is officially open! Get started here.

How to close or terminate a gliderecord

Stewe Lundin
Mega Guru

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.  

7 REPLIES 7

Ujjawal Vishnoi
Mega Sage

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


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


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.


Thanks.



Ill try to work around that mentally then, old habits are hard to kill .



/Stewe