Changeset - r11298:f20b2b05dfe3
[Not reviewed]
master
0 1 0
michi_cc - 15 years ago 2009-03-09 18:41:54
michi_cc@openttd.org
(svn r15652) -Fix [FS#2706]: new (this) is seldom a good idea as destructors of member variables aren't run causing memory leaks.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/vehicle.cpp
Show inline comments
 
@@ -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
0 comments (0 inline, 0 general)