Storing a Bitmap resource in a static variable
<p>I have a view which displays a small bitmap, and this is used in many places in my application (especially list views). I'm currently loading this bitmap each time an instance of that view is created using <code>BitmapFactory.decodeResource(resource, id)</code>. I realized that I can improve performance by loading that bitmap once into a static variable (so that all instances of the view reuse it) and that did indeed save about 2-4 ms per view instance. My question, does using a static variable in this way cause any type of memory leak in Android? I'm worried because I haven't found any other example that uses a static variable to store a bitmap like this.</p>

<p><strong>Follow up question:</strong> <a href="http://stackoverflow.com/questions/8824004/how-to-keep-a-bitmap-in-memory">How to keep a Bitmap in memory</a></p>
