(svn r10799) -Fix: only calling QuickFree and not the destructor on pool cleanups might cause memory leaks due to the way C++ works.
This commit is contained in:
@@ -404,17 +404,14 @@ Waypoint::Waypoint(TileIndex tile)
|
||||
|
||||
Waypoint::~Waypoint()
|
||||
{
|
||||
if (this->string != STR_NULL) DeleteName(this->string);
|
||||
|
||||
if (CleaningPool()) return;
|
||||
|
||||
RemoveOrderFromAllVehicles(OT_GOTO_WAYPOINT, this->index);
|
||||
|
||||
RedrawWaypointSign(this);
|
||||
this->xy = 0;
|
||||
|
||||
this->QuickFree();
|
||||
}
|
||||
|
||||
void Waypoint::QuickFree()
|
||||
{
|
||||
if (this->string != STR_NULL) DeleteName(this->string);
|
||||
}
|
||||
|
||||
bool Waypoint::IsValid() const
|
||||
|
Reference in New Issue
Block a user