2 registered members (Akow, tomaslolo),
1,536
guests, and 12
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Memory leaks, continue
#275804
07/02/09 12:41
07/02/09 12:41
|
Joined: Aug 2004
Posts: 1,345 Kyiv, Ukraine
VeT
OP
Serious User
|
OP
Serious User
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
|
when i diselect entity, i call function
void HlSpriteHideModel(ENTITY* ent)
{
if (ent.sHandSprt != NULL)
{
ENTITY* sprEnt = ptr_for_handle(ent.sHandSprt);
ent_remove(sprEnt);
ent.sHandSprt = NULL;
}
}
if i comment this function's call, number of functions on the debug panel is 18 and it undepends from how many times i select/diselect bots if i uncomment this function's call, number of functions increased depending on unmber of times, when i diselect entity why this function can do that, i dont have loops there?
|
|
|
Re: Memory leaks, continue
[Re: VeT]
#275809
07/02/09 12:46
07/02/09 12:46
|
Joined: Feb 2009
Posts: 2,154
Damocles_
Expert
|
Expert
Joined: Feb 2009
Posts: 2,154
|
can you try:
void HlSpriteHideModel(ENTITY* ent)
{
if (ent.sHandSprt != NULL)
{
ENTITY* sprEnt = ptr_for_handle(ent.sHandSprt);
ent.sHandSprt = NULL;
ent_remove(sprEnt);
}
}
switching it around, maybe it does not get removed (keeps in memory) before the stored pointer in the eneity is set to null..
|
|
|
|