fix some memory leaks

This commit is contained in:
mq1n
2025-08-27 23:37:19 +03:00
parent 6459c9fa03
commit e5bd21ff75
10 changed files with 149 additions and 116 deletions

View File

@@ -11,6 +11,7 @@
#include "PhysicsObject.h"
#include "ActorInstanceInterface.h"
#include "Interface.h"
#include "../SpeedTreeLib/SpeedTreeForest.h"
//#include "../eterGrnLib/ThingInstance.h"
class CItemData;
@@ -808,7 +809,7 @@ class CActorInstance : public IActorInstance, public IFlyTargetableObject
THitDataMap m_HitDataMap;
CActorInstance * m_pkHorse;
CSpeedTreeWrapper * m_pkTree;
CSpeedTreeForest::SpeedTreeWrapperPtr m_pkTree;
protected:

View File

@@ -4,6 +4,7 @@
#include "../eterGrnLib/ThingInstance.h"
#include "MapType.h"
#include "DungeonBlock.h"
#include "../SpeedTreeLib/SpeedTreeForest.h"
class CMapOutdoor;
class CEffectInstance;
@@ -90,7 +91,7 @@ class CArea
CAttributeInstance * pAttributeInstance;
// Data For Tree
CSpeedTreeWrapper * pTree;
CSpeedTreeForest::SpeedTreeWrapperPtr pTree;
// Data For Normal Object or Building
BOOL isShadowFlag;
@@ -152,7 +153,7 @@ class CArea
}
} TObjectInstance;
typedef std::vector<CSpeedTreeWrapper *> TTreeInstanceVector;
typedef std::vector<CSpeedTreeForest::SpeedTreeWrapperPtr> TTreeInstanceVector;
typedef std::vector<CGraphicThingInstance *> TThingInstanceVector;
typedef std::vector<CDungeonBlock *> TDungeonBlockInstanceVector;
typedef std::vector<TObjectInstance *> TObjectInstanceVector;

View File

@@ -723,7 +723,7 @@ class CMapOutdoor : public CMapBase
private:
struct SXMasTree
{
CSpeedTreeWrapper* m_pkTree;
CSpeedTreeForest::SpeedTreeWrapperPtr m_pkTree;
int m_iEffectID;
} m_kXMas;