free memory associated with the window