Memory leak
Closed this issue · 1 comments
CrazyHackGUT commented
FixHintColorMessages/FixHintColorMessages.sp
Lines 74 to 106 in 5a07f05
void TextMsgFix(DataPack hPack) | |
{ | |
int iCount = hPack.ReadCell(); | |
static int iPlayers[MAXPLAYERS+1]; | |
for(int i = 0; i < iCount; i++) | |
{ | |
iPlayers[i] = hPack.ReadCell(); | |
} | |
int[] newClients = new int[MaxClients]; | |
int newTotal = 0; | |
for (int i = 0; i < iCount; i++) { | |
int client = iPlayers[i]; | |
if (IsClientInGame(client)) { | |
newClients[newTotal] = client; | |
newTotal++; | |
} | |
} | |
if (newTotal == 0) { | |
return; | |
} | |
static char sBuf[sizeof g_sSpace]; | |
hPack.ReadString(sBuf, sizeof sBuf); | |
delete hPack; |
If
newTotal
equals to 0
, datapack leaves don't closed.Franc1sco commented
Fixed, thanks.