File tree Expand file tree Collapse file tree 3 files changed +303
-120
lines changed Expand file tree Collapse file tree 3 files changed +303
-120
lines changed Original file line number Diff line number Diff line change @@ -596,6 +596,13 @@ CMultiplayerSA::CMultiplayerSA()
596596 m_dwLastStaticAnimID = eAnimID::ANIM_ID_WALK;
597597}
598598
599+ CMultiplayerSA::~CMultiplayerSA ()
600+ {
601+ // Cleanup hooks that require explicit resource deallocation
602+ // This is to prevent resource leaks
603+ CleanupHooks_HookDestructors ();
604+ }
605+
599606void CMultiplayerSA::InitHooks ()
600607{
601608 InitKeysyncHooks ();
Original file line number Diff line number Diff line change @@ -48,10 +48,11 @@ class CMultiplayerSA : public CMultiplayer
4848 CRemoteDataSA* RemoteData;
4949
5050public:
51- ZERO_ON_NEW
51+ ZERO_ON_NEW
5252
53- CMultiplayerSA ();
54- void InitHooks ();
53+ CMultiplayerSA ();
54+ ~CMultiplayerSA ();
55+ void InitHooks ();
5556 void InitHooks_CrashFixHacks ();
5657 void Init_13 ();
5758 void InitHooks_13 ();
@@ -60,6 +61,7 @@ class CMultiplayerSA : public CMultiplayer
6061 void InitHooks_ClothesSpeedUp ();
6162 void InitHooks_FixBadAnimId ();
6263 void InitHooks_HookDestructors ();
64+ void CleanupHooks_HookDestructors ();
6365 void InitHooks_RwResources ();
6466 void InitHooks_ClothesCache ();
6567 void InitHooks_Files ();
You can’t perform that action at this time.
0 commit comments