Hi List,

I was comparing jquery-1.1.2 against jquery-1.1.3.1 on its behavour
with
memory usage and especially cleanup.

I found that objects (in this case images) created with jquery were
automatically released in jquery-1.1.2, not even needed to call
$("img").empty();

With jquery-1.1.3.1 this behaviour is gone. Also $("img").empty() does
not lead to reduce the amount of memory used by e.g. Internet
Exploder.

sample code voor one image.

$("<IMG>").appendTo("#viewport")
     .attr({ id: map + "A", src: "images/blank.gif" })
     .css(
     {position: "absolute",
      left: "0px",
      top: "0px",
      width: "600px",
      height: "400px",
      visibility: "visible"})
     .load(function(){ var svr =
this.id.substr(0,this.id.length-1);SERVERS[svr].map_ready = this.id;})


The image will constantly get changing URLs from mapping servers.
My application has 10 such images, they consume 25Kb.
While reloading the mapview frame ( with top.mapview.location.href =
mapview.htm ) i can see if memory increases.
I test the behaviour also, by openeing new windows, to see memoryusage
increase. Closing the windows will then reduce.memory

in 1.1.2, on unload, this memory is freed  even without code.
in 1.1.3.1, on unload,  this memory is not  freed not even by
$.empty()

Is this deliberate behaviour? What is the intended behaviour. What is
in
general the comment on the possibility of memory management by
Javascript.


Regards, Huub

Reply via email to