I am trying to write an image previewer. Images are processed after page loads and then I add "mouseover" functions to each to show them in the previewer.
I had problems getting the size of images and got the solution in HERE
I am not new to javascript but not advanced enough to understand this: In the solution I referenced above, what happens to "img" object created in the "getMeta" function? will it be deleted after "mouseover" event processed or it stays in the memory until page closed? If it stays, is there a way to dispose them?
Since there might be, let's say, a hundred of these image links, I want to prevent any memory problem resulted off this after hovering them all.
EDIT: "getMeta" function
function getMeta(imageSrc,callback) {
var img = new Image();
img.src = imageSrc;
img.onload = function() { callback(this.width, this.height); }
}