Skip to content

Commit 96ebf33

Browse files
Maullerxezon
authored andcommitted
[GEN][ZH] Fix material memory leak in ~W3DLaserDraw() (#623)
1 parent 803ad54 commit 96ebf33

File tree

2 files changed

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

2 files changed

+4
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ W3DLaserDraw::~W3DLaserDraw( void )
234234
} // end for i
235235

236236
delete [] m_line3D;
237+
// TheSuperHackers @fix Mauller 11/03/2025 Free reference counted material
238+
REF_PTR_RELEASE(m_texture);
237239
}
238240

239241
//-------------------------------------------------------------------------------------------------

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,8 @@ W3DLaserDraw::~W3DLaserDraw( void )
237237
} // end for i
238238

239239
delete [] m_line3D;
240+
// TheSuperHackers @fix Mauller 11/03/2025 Free reference counted material
241+
REF_PTR_RELEASE(m_texture);
240242
}
241243

242244
//-------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)