Loading ...
Sorry, an error occurred while loading the content.

HELP! garbage collection problem!! I am stucked!

Expand Messages
  • lionel.raharinosy@exponent.co.uk
    Hello there, I have got a problem. I dynamically create elements* (using createElement() - appendChild () ) on my canvas, and at some point I need to delete
    Message 1 of 1 , Mar 20, 2001
    • 0 Attachment
      Hello there,

      I have got a problem.
      I dynamically create elements* (using createElement() - appendChild
      () ) on my canvas, and at some point I need to delete them.
      so far I'm using that code.

      svgContents = svgDoc.getElementById( "allContents" );
      item = svgDoc.getElementById( "group1" );
      var dump = svgContents.removeChild( item );
      dump = null;
      eventually, if i could just remove the childs of the group1, that
      will be better!

      ..but it doesn't seem to free physical memory!! why? why not?
      ...do I miss something? I know that looking through the archives,
      peple said that it's better to avoid 'creating'
      or 'cloning' elements ( cause involving memory allocation) but it
      must be a (simple?) way to free up memory?
      //-------------------------------------------
      <g id="allContents">

      <g id="group1">

      ...new elements here*

      </g>
      </g>

      I would appreciate a lot, some help and advice.
      Thanks.

      Lionel ( on his way to be lost in svg space...)
    Your message has been successfully submitted and would be delivered to recipients shortly.