Fix up the last commit (free small memory leak) better.
Fix leaking window icons on Windows