Destructor for xMenu?

During development, I’m keeping an eye on Memory Leakage of my own application that uses your components. I’m using Drip (outofhanwell.com/ieleak/).

If I load a page that has an xMenu on it, then reload it multiple times, the memory use of IE increases on each reload - probably not unexpected behaviour.

I have a “LogOut” function in the application that tidies up when the browser-based application is terminated or unloaded.

What do I need to do/call to destroy an xMenu and prevent memory leaks?



Best Regards

There is no such thing as “destructor” in dhtmlxMenu, but latest version supports clearAll method, which nullifies used objects, so it partially solve memory leak problem
    menu = new…
    … usage …
    //before reloading
    menu.clearAll();
    menu.loadXML(url);


Version which fully support this method will be released as part of global update in few days, but if you need it ASAP - please use attached js file instead of original one.

dhtmlxmenubar.zip (55.2 KB)