When i switch to another view,the previous view will preserve state,i need cancel state

when i switch to another view,the previous view will preserve state,i dont want that,How do I set it up?please