javascript - clear memory leak using svg -


i using svg scribble on image in ipad phonegap application.
code initializing svg is:

function initdrawing(){  var paper; var masterbackground ;     paper = raphael(document.getelementbyid('scroller'),780,1500);     masterbackground = paper.image("data:image/jpg;base64,"+test,0,0,780,1500); } 

i using raphael.js library create svg element.
works fine. have next , previous button. if click next button again function initdrawing() called. new image loaded , hand scribbling gets slower. each time click next button scribbling gets slower , slower. why happening? has memory leak occurred?

have checked dom looks like? looks might keep adding images, instead of replacing existing one.

if want keep old images around, should @ least set display="none" on them.


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -