Skip to content

A lot of Preview image cause memory leak #168

Description

@buddycat75

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions