Added dispose when the windows shutdown.
Added dispose when the windows shutdown.