21.01.2015, 00:25
(
Последний раз редактировалось PaulDinam; 21.01.2015 в 01:55.
)
I understand, it was just for testing purposes anyway.
So using calloc() in CMD: on every time will cause memory leak even after I set a pointer to null and free it?
Here's what I did using memory allocation: (not sure if it's written properly or has any memory leaking)
http://pastebin.com/ApQiGUNR
And when a player disconnects:
Connect
So using calloc() in CMD: on every time will cause memory leak even after I set a pointer to null and free it?
Here's what I did using memory allocation: (not sure if it's written properly or has any memory leaking)
http://pastebin.com/ApQiGUNR
And when a player disconnects:
pawn Код:
MEM_MACR_foreach(MAX_TEXT_MESSAGES, i) // Text messages
{
MEM::free(Texts[playerid][i]);
Texts[playerid][i] = Pointer:0;
}
pawn Код:
MEM_MACR_foreach(MAX_TEXT_MESSAGES, i) // Text messages
{
Texts[playerid][i] = MEM::calloc(e_TEXT);
}