bool CPythonNonPlayer::LoadNonPlayerData(const char *c_szFileName)
TMobTable *pTable = (TMobTable *) zObj.GetBuffer();
for(DWORD i = 0; i < dwElements; ++i, ++pTable)
TMobTable *pNonPlayerData = new TMobTable;
memcpy(pNonPlayerData, pTable, sizeof(TMobTable));
The problem is not in this function. The problem is in the way you handle
m_NonPlayerDataMap. This function transfers ownership of some objects to that map, and it's that map's responsibility to
delete them when it's done with them. I'll bet it doesn't.
By the way, to avoid this kind of problem just don't do this. Don't use
new unless you really need to. Instead, make the map a map of values rather than a map of pointers. If you can't figure out any way to make that happen, at least use smart pointers rather than raw pointers.