Hi,
If i get a bitmap with the codes like this:
bitmap = BitmapFactory.decodeResource(getResources(),
imgList.get(imgIndex));
Should i need to free the memory of the bitmap with the following
codes later.
if(bitmap != null){
{
bitmap.recycle();
bitmap = null;
}
thank you ~~~
* Codes as follows:*
/**
* 只负责读取图片的线程
*/
class LoadImage extends Thread {
int imgIndex = 0;
public void run() {
while (true) {
bitmap =
BitmapFactory.decodeResource(getResources(),
imgList.get(imgIndex));
imgIndex++;
if (imgIndex == imgList.size())//如果到尽头则重新读取
imgIndex = 0;
}
}
};
--
杨辉
Impossible is nothing!
------------------------------------------------------------------------------------
HDExplorer APK (A Nice File Manager,Simplicity but not simple.)
Google Market:
https://market.android.com/details?id=com.hd.explorer
Google Code:
http://code.google.com/p/hdexplorer/
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en