in my app i have stored some images in drawable and i am showing those images in custom list view. When the activity gets opened and closed, the images are been allocated. When i do this continuously for around 12 times my app get crashed and it said because of memory out of image exception.
Then going through some others question in stack over flow i cleared the memory by clearing the recycle. But still the same error gets continued. Some others suggested that this may be due to not giving finish() in the end of the activity. I have tried that too but the same error gets continued. Then i tried clearing the image views too.
But after all this the number of times i am running the app get increased but the same error gets continued and it says that because of OutOfMemoryError. I dont know what to do here
Now my doubt is, i am calling this activity through an async task. Though the activity gets finished, the async task used to create an reference of the class. So i fear that because of this the app is getting crashed.
If my doubt is right, please tell me how to check whether the reference of asyn task exists or not even after finishing the activity. If it is there how to clear it,
please help me friends.....