Handle the WM_DESTROY message and clean up there.
Update issue #369
Authored by: tortoisesvn 2012-05-01
Parent: [r679]
Child: [r681]