0

This I know is quite a basic one, but, please tell me how can I destroy an object in javascript, that is created dynamically.

Actually I have created an instance of nicEdit javascript text editor, and after taking user's input in it and saving the entered text, I want to destroy it.

Here's a snippet of code im using to create an instance:

    myNicEditor = new nicEditor();

Here nicEdit variable is global.

And here's how im destroying it right now:

    myNicEditor = undefined;

inside a function. But, its not deleting. I know this b'coz when i create another instance using same variable name, i'm able to see my last entered text, that it has saved internally.

Plz help..

Nitin Bansal
  • 2,986
  • 3
  • 23
  • 30

1 Answers1

0

Just look at the documentation, it is stated clearly.

aziz punjani
  • 25,586
  • 9
  • 47
  • 56