I have this problem i would like to recycle the image only if it loaded if it hasnt finish loaded and the user navigates away from it then i shouldnt recycle the bitmap because it doesnt exist and the system crashes on me,
Button bRight = (Button) findViewById(R.id.buttonRight);
bRight.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
startActivity(new Intent("intent"));
bitmaptwo.recycle();
finish();
}
});
am doing this to stop a memory leak and it works but is not the best way of implementing it since when the image hasnt loaded the system crashes because it is an asynchronimous task, can someone help me?,
thank you
1 Answer