mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 14:38:18 +00:00
Fix memory leak in draggers
This commit is contained in:
parent
a4e2130342
commit
173b43d487
|
@ -392,13 +392,14 @@ CDraggerTeam::CDraggerTeam(CGameWorld *pGameWorld, vec2 Pos, float Strength,
|
||||||
{
|
{
|
||||||
for (int i = 0; i < MAX_CLIENTS; ++i)
|
for (int i = 0; i < MAX_CLIENTS; ++i)
|
||||||
{
|
{
|
||||||
m_Draggers[i] = new CDragger(pGameWorld, Pos, Strength, NW, i, Layer,
|
m_Draggers[i] = new CDragger(pGameWorld, Pos, Strength, NW, i, Layer, Number);
|
||||||
Number);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//CDraggerTeam::~CDraggerTeam() {
|
CDraggerTeam::~CDraggerTeam()
|
||||||
//for(int i = 0; i < MAX_CLIENTS; ++i) {
|
{
|
||||||
// delete m_Draggers[i];
|
for (int i = 0; i < MAX_CLIENTS; ++i)
|
||||||
//}
|
{
|
||||||
//}
|
delete m_Draggers[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ public:
|
||||||
|
|
||||||
CDraggerTeam(CGameWorld *pGameWorld, vec2 Pos, float Strength, bool NW =
|
CDraggerTeam(CGameWorld *pGameWorld, vec2 Pos, float Strength, bool NW =
|
||||||
false, int Layer = 0, int Number = 0);
|
false, int Layer = 0, int Number = 0);
|
||||||
//~CDraggerTeam();
|
~CDraggerTeam();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // GAME_SERVER_ENTITIES_DRAGGER_H
|
#endif // GAME_SERVER_ENTITIES_DRAGGER_H
|
||||||
|
|
Loading…
Reference in a new issue