block memory cleanup