(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 6667241814
commit 81595bf256
1 changed files with 1 additions and 1 deletions

View File

@ -608,7 +608,7 @@ Vehicle::~Vehicle()
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