views:

59

answers:

2

Hello all,

I have the following code using RapahelJs running in IE. This code cause a memory leak and I don't know what is wrong. Does anybody can help me and give some advices in the usage of raphaeljs and memory leaks.

for (i=0; i<2000; i++) {
    var r = paper.rect(100, 100, 30, 30);
    r.remove();
    r = null;
}

Thanks in advance

A: 

I received an advice from the rapahels discussion group. I can summarize in one sentence:

Prefer hide/show than remove/create

luc
A: 

I can’t see any leakage in given example. Memory does go high, but after time, when GC runs, it goes back to normal. Run the similar example in plain HTML and tell me if you will have a difference.

Dmitry Baranovskiy