Clear resources when resume.