Look at the bitmap recycle() function. You might also need to set the bitmap option to purgeable. Here is a snippet where I resize a bitmap and output to a JPEG:
BitmapFactory.Options options = new BitmapFactory.Options();;
options.inPurgeable = true;
Bitmap original = BitmapFactory.decodeByteArray(input , 0, input.length, options);
Bitmap resized = Bitmap.createScaledBitmap(original, NEW_WIDTH, NEW_HEIGHT, true);
ByteArrayOutputStream blob = new ByteArrayOutputStream();
resized.compress(Bitmap.CompressFormat.JPEG, 30, blob);
// recycle the memory
original.recycle();
resized.recycle();