Open
Description
This will result in memory leak --> Naviguator wont free any memory -->
var my_preloader = new moxie.image.Image();
myfunction {
my_preloader.onload = function() {
//resize and display thumbs
my_preloader.destroy();
my_preloader = null;
setTimeout(lazyLoad, 1); //load, resize and display next image
}
my_preloader.load(file.getSource());
}
AND This is ok --> Naviguator reuse the same object -->
var reader = new FileReader();
myfunction {
reader.onloadend = function () {
//resize and display thumbs
setTimeout(lazyLoad, 1); //load, resize and display next image
}
reader.readAsDataURL(file.getNative());
}
PS If you only need preview (dont need to upload resized image)
Thanks in advance
Metadata
Metadata
Assignees
Labels
No labels