Skip to content

Commit 322fca6

Browse files
committed
[GEN][ZH] Fix particle systems memory leak in ~W3DTankDraw() (#623)
1 parent cf32f8d commit 322fca6

File tree

2 files changed

+6
-0
lines changed
  • Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw
  • GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw

2 files changed

+6
-0
lines changed

Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DTankDraw.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,9 @@ void W3DTankDraw::createEmitters( void )
163163
//-------------------------------------------------------------------------------------------------
164164
W3DTankDraw::~W3DTankDraw()
165165
{
166+
// TheSuperHackers @fix Mauller 16/04/2025 Delete particle systems
167+
tossEmitters();
168+
166169
for (Int i=0; i<MAX_TREADS_PER_TANK; i++)
167170
if (m_treads[i].m_robj)
168171
REF_PTR_RELEASE(m_treads[i].m_robj);

GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DTankDraw.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,9 @@ void W3DTankDraw::createEmitters( void )
163163
//-------------------------------------------------------------------------------------------------
164164
W3DTankDraw::~W3DTankDraw()
165165
{
166+
// TheSuperHackers @fix Mauller 16/04/2025 Delete particle systems
167+
tossEmitters();
168+
166169
for (Int i=0; i<MAX_TREADS_PER_TANK; i++)
167170
if (m_treads[i].m_robj)
168171
REF_PTR_RELEASE(m_treads[i].m_robj);

0 commit comments

Comments
 (0)