fix memory leak for prepare next stage
delete constant to prepare next stage.