Fixed some mmgr bugs

This commit is contained in:
David Anderson 2005-08-15 21:38:03 +00:00
parent bf092b4f95
commit 98d3fb79d7

View File

@ -597,7 +597,13 @@ int unload_amxscript(AMX* amx, void** program)
CList<CScript,AMX*>::iterator a = g_loadedscripts.find( amx ); CList<CScript,AMX*>::iterator a = g_loadedscripts.find( amx );
if ( a ) a.remove(); if ( a ) a.remove();
char *prg = (char *)*program; char *prg = (char *)*program;
#if defined __linux__ && defined JIT && defined MEMORY_TEST
#undef free
free(prg);
#define free(ptr) m_deallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_free,ptr)
#else
delete[] prg; delete[] prg;
#endif
*program = 0; *program = 0;
return AMX_ERR_NONE; return AMX_ERR_NONE;
} }