free memory before deploy