Quote:
Originally Posted by pride95
PHP Code:
DataPack pk = new DataPack();
if(iClient) pk.WriteCell(GetClientSerial(iClient));
else pk.WriteCell(0);
char cQuery[256];
FormatEx(cQuery, sizeof(cQuery), "SELECT NULL FROM `bans_table` WHERE `steamid` = '%s';", cSteam);
dDatabase.Query(SQL_OnAddbanCommand, cQuery, pk, DBPrio_Normal);
public void SQL_OnAddbanCommand(Database db, DBResultSet rs, const char[] error, any data)
{
if(rs != null)
{
DataPack pk = view_as<DataPack>(data);
pk.Reset();
int iClient = GetClientFromSerial(pk.ReadCell());
etc
delete pk;
}
}
this is what i'm using. no leak memory.
|
Damn, this was the output of the sourcemod_fatal.log
Code:
L 03/09/2018 - 20:43:31: --------------------------------------------------------------------------
L 03/09/2018 - 20:43:31: Type IBaseMenu | Count 127
L 03/09/2018 - 20:43:31: Type IQuery | Count 14892
L 03/09/2018 - 20:43:31: Type IDatabase | Count 18
L 03/09/2018 - 20:43:31: Type DataPack | Count 1203
L 03/09/2018 - 20:43:31: -- Approximately 165916 bytes of memory are in use by (16240) Handles.