How to free Private Data of JS Object

H

helloneeraj

Hi All,
I am new to Javascript and form JS API i get to know that we need
to free private data of any object. Garbage collector will free memory
allocated by JS memory allocating api's.

How can we free private data of an object??? How can we attach a
function as a destructor to that Class???
 
M

MadMad

Hi All,
I am new to Javascript and form JS API i get to know that we need
to free private data of any object. Garbage collector will free memory
allocated by JS memory allocating api's.

How can we free private data of an object??? How can we attach a
function as a destructor to that Class???

You have to set variables to null, create some function to do it...
but if you are using objects they will be destroyed when out of scope
i am saying inside the { } in a function....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,436
Messages
2,571,696
Members
48,796
Latest member
Greg L.
Top