Bill
Bill

Reputation: 19248

as3 Greensock LoaderMax memory

I have a bit trouble with LoaderMax memory occupy, i have a queue, and i am keep loading images depend on user's action. if they click load more and it keep load, but i would like to clean the memory which been occupied by the previous queue (i have remove all the children been added by the loading previously). is there a way i can do it?

the behavior like this.

load (load the page 1) load (load the page 2 and clean the page 1)

queue = new LoaderMax({name:"mainQueue", autoDispose :'true'});

**

A very quick question, everything in the queue (images). Do they all cache in the browser?

**

Upvotes: 0

Views: 1977

Answers (1)

Hawks
Hawks

Reputation: 534

{ autoDispose:true } will not unload content, only call the LoaderMax instances dispose method automatically.

You can either call queue.unload() or queue.dispose(true) to remove your loaded content.

Also make sure you have removed any listeners from the children you added to the display to ensure they are garbage collected.

LoaderMax Documentation

To answer your quick question: depends on the browsers settings but probably. LoaderMax has cache-busting options if you are worried about that.

Upvotes: 4

Related Questions