(svn r15652) -Fix [FS#2706]: new (this) is seldom a good idea as destructors of member variables aren't run causing memory leaks.

This commit is contained in:
michi_cc
2009-03-09 18:41:54 +00:00
parent 0418e2c9d1
commit 80133f67ea

View File

@@ -608,7 +608,7 @@ Vehicle::~Vehicle()
DeleteVehicleNews(this->index, INVALID_STRING_ID); DeleteVehicleNews(this->index, INVALID_STRING_ID);
new (this) InvalidVehicle(); this->type = VEH_INVALID;
} }
/** Adds a vehicle to the list of vehicles, that visited a depot this tick /** Adds a vehicle to the list of vehicles, that visited a depot this tick