added explicit garbage collection for bitmaps