Forum Moderators: open

Message Too Old, No Replies

Object Destroy

How to destroy an object

         

corvonero

7:40 pm on Oct 13, 2004 (gmt 0)

10+ Year Member



Hello,
I have this huge, time consuming, memory eating object wich I developed and I would like to destroy it completeley after use...

What I did, so far, is:

--
var ob = new myObject();
ob = null;
--

this looks like it's working, in the sense that right after object creatin, "ob" is in fact null...
The object is living by it's own, thou and it is still alive (can't call it from outside, by it lives in memory and cpu).

What I am asking is if it's somehow possible to destroy it with an inner function...

Of course trying
--
this = null;
--
doesn't work...

ANY help appreciated.

--
Manu

Bernard Marx

9:28 pm on Oct 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



FRom what I've read, it seems that in, Internet Explorer, memory leaks can be caused by 'islands' of orphaned circular references. This happens when one of the objects involved is a browser element or an ActiveX object.

Apparently, the memory isn't freed even by refreshing or leaving the document, but only by closing the window itself.

If you are using inner functions, it's possible that they might be the cause rather than the solution. (Shaky ground for me still though).