mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-26 06:45:37 +03:00
Fixed some mmgr bugs
This commit is contained in:
parent
bf092b4f95
commit
98d3fb79d7
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user