Fix Visual Studio 32 bit warnings && a static analysis warning for a memory leak