Avoid leaking memory with shell3 on windows.