After all, you can't control the garbage collector. You simply don't know when and why it collects garbage or not. System.gc(); doesn't enforce this by definition. It's just a hint. However, are you still getting OutOfMemory-Exceptions or are you just bothering with that heap-increase-message? I wrote myself a little test case that does this in each frame:
cnt++;
if ((cnt & 2) == 0) {
Texture t=new Texture(1024, 1024, new RGBColor(cnt % 255, cnt % 255, cnt % 255));
t.setMipmap(true);
TextureManager.getInstance().unloadTexture(fb, TextureManager.getInstance().getTexture("texture"));
TextureManager.getInstance().replaceTexture("texture", t);
Logger.log("new Texture!");
}
I.e. every second frame, it creates a new 4 MB large texture and replaces the former one with it. This runs without problems, the memory will be reclaimed as needed. However, i get a log message each time i'm doing this:
01-30 19:55:04.288: INFO/dalvikvm-heap(491): Grow heap (frag case) to 14.706MB for 4194320-byte allocation
...with exactly the same value of 14.706MB over and over again. So the VM prints out BS here IMHO, but it doesn't hurt. I don't see why it shouldn't work in your case unless the rest of what you are doing (canvas, drawable, bitmap...) is causing a problem somehow. I've read multiple times that working with Bitmap can cause memory leaks for example.