src/station.cpp
changeset 7909 8df54a2839a1
parent 7873 b3bccdcf85ef
child 7916 8bc57ab02de6
--- a/src/station.cpp	Sun Aug 05 17:43:04 2007 +0000
+++ b/src/station.cpp	Sun Aug 05 21:20:55 2007 +0000
@@ -64,6 +64,11 @@
 {
 	DEBUG(station, cDebugCtorLevel, "I-%3d", index);
 
+	DeleteName(this->string_id);
+	free(this->speclist);
+
+	if (CleaningPool()) return;
+
 	MarkDirty();
 	RebuildStationLists();
 	InvalidateWindowClasses(WC_STATION_LIST);
@@ -81,14 +86,6 @@
 	for (CargoID c = 0; c < NUM_CARGO; c++) {
 		goods[c].cargo.Truncate(0);
 	}
-
-	this->QuickFree();
-}
-
-void Station::QuickFree()
-{
-	DeleteName(this->string_id);
-	free(this->speclist);
 }
 
 /** Called when new facility is built on the station. If it is the first facility