clean check point for memory management