public void drawOnBitmap(DrawListener drawRoutine_) { if (drawRoutine_ != null && _Source != null) { RelativeViewAbstract nullView = new RelativeViewAbstract("nullView"); nullView.setWH(_BitmapRect.width(), _BitmapRect.height()); Canvas cBitmap = new Canvas(_Source); RelativeCanvas rCanvas = new RelativeCanvas(cBitmap, new Rect(0, 0, width(), height())); drawRoutine_.onCustomDraw(rCanvas, nullView); cBitmap = null; rCanvas.destroy(); rCanvas = null; nullView.destroy(); nullView = null; } }