mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Maps: Fix memory leak in BoundaryUnionBoundary
Add missing destructor in BoundaryUnionBoundary to avoid reporting a memory leak (even if it's used only in a global variable)
(cherry picked from commit 724499cf9c)
This commit is contained in:
@@ -103,6 +103,11 @@ BoundaryUnionBoundary::BoundaryUnionBoundary(AreaBoundary const* b1, AreaBoundar
|
||||
{
|
||||
ASSERT(b1 && b2);
|
||||
}
|
||||
BoundaryUnionBoundary::~BoundaryUnionBoundary()
|
||||
{
|
||||
delete _b1;
|
||||
delete _b2;
|
||||
}
|
||||
bool BoundaryUnionBoundary::IsWithinBoundaryArea(Position const* pos) const
|
||||
{
|
||||
return (_b1->IsWithinBoundary(pos) || _b2->IsWithinBoundary(pos));
|
||||
|
||||
@@ -156,6 +156,7 @@ class TC_GAME_API BoundaryUnionBoundary : public AreaBoundary
|
||||
BoundaryUnionBoundary(AreaBoundary const* b1, AreaBoundary const* b2, bool isInverted = false);
|
||||
|
||||
protected:
|
||||
virtual ~BoundaryUnionBoundary();
|
||||
bool IsWithinBoundaryArea(Position const* pos) const override;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user