Page 1 of 1

variables, their validity and the memory consumption

PostPosted: Thu Jan 06, 2022 8:32 pm
by Otto
Hello Charly,
after you are currently online, I take the opportunity to ask you something about the variables, their validity and the memory consumption.

If I create a Harbour hash and then pass it to a JavaScript object and then the mod harbour program reaches the end while processing the lines, what happens to the harbour hash.

Let us assume that I have a modal dialog with a table and fill it with AJAX.
Do I have to delete the JS object?
How to free the memory?

Best regards,
Otto

Re: variables, their validity and the memory consumption

PostPosted: Fri Jan 07, 2022 8:59 am
by Antonio Linares
Dear Otto,

Once you are running javascript you are on the client side

Harbour only runs on the server and for an instant, so as soon as its result is delivered, it ends completely, freeing everything

Re: variables, their validity and the memory consumption

PostPosted: Fri Jan 07, 2022 10:30 am
by Otto
Dear Antonio,
thank you.

I understand. Would you be so kind to tell us something about how to free JS from objects?
Best regards,
Otto

Re: variables, their validity and the memory consumption

PostPosted: Fri Jan 07, 2022 2:37 pm
by Antonio Linares
Dear Otto,

As far as I know it, JS uses automatic garbage collection:

https://javascript.info/garbage-collection

so you should not worry about it