image - Android - how to avoid memory over load using bitmaps? -


my application using bitmaps , every time user come specific activity shows image second time stops working.

bitmap bm = bitmapfactory.decodefile(environment.getexternalstoragedirectory()+"//pics/"image.jpg"); 

i have tried using things like...

bitmapfactory.options options = new bitmapfactory.options();      options.intempstorage = new byte[16*1024]; 

not sure set too. doesnt help. once user leaves activity there not way clear bitmap etc? thanks

call bitmap.recycle() when done using bitmap free memory.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -