Javascript - how to delete an object? -


i have object:

var myobj = new myawsumobj();

now, deleting that:

myobj = undefined;

but apparently nothing, since object still exists (i can see exceptions being thrown in 'external' javascript file object defined in).

how clear stuff up? possible? because seems myobj doing in external javascript file, maybe creating new objects, possible clear mess without refactoring external file?

unfortunately, it's not possible. description, object seems creating references itself, adding event handlers, setting timeouts/intervals, ajax callbacks, whatever. if clear references object created yourself, you'd still have clear references creates on own. become inactive, unreferenced, , eligible garbage collection.

but source code, maybe object provides "destruct" method take care of mess.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -