Hi all, 
I have this test code:

var ews = {};
(function (ews) {
    function testFunction1(a) {
        var num = a;
        return function(b){   
            return num = addOne(num);

    function addOne(a){
        return a;
    ews.publicFunction = testFunction1;

function start(){
    var number = ews.publicFunction(5);
    var result = number(6);
    var element = new Element('span', { 'id': 'testSpan', 'class': 'test' 
}).insert('stop:_' + result);
    ews.eventElement = element.on('click', eventFunc.bind(element));

function eventFunc(event,element) {
    ews.eventElement = null;
    element = null;
    delete (element);

As you can see I'm creating a simple HTML span, adding an event to it and 
inserting the span to my HTML body.

Before clicking IE8 keeps 49.664 Kb

Normally after clicking I'm removing everything, the element and the event 
but the memory grows instead of going down!!

After clicking IE8 keeps 49.800 Kb

It's a small difference but I still can't understand why after destroying 
everything the memory grows. Also, in my real application I have thousands 
of events so I have thousands of Kb growing and growing every time a user 

Thanks a lot for your time and help.

Kr, Jose

You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To view this discussion on the web visit 
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to