Dispose view when window closes