(svn r22111) -Codechange/fix-ish: upon cleaning a pool a destructor should not delete items from other pools

This commit is contained in:
rubidium
2011-02-19 18:02:17 +00:00
parent 3e619faeaf
commit 7e4ff17e35
4 changed files with 22 additions and 2 deletions

View File

@@ -154,6 +154,16 @@ CargoList<Tinst>::~CargoList()
}
}
/**
* Empty the cargo list, but don't free the cargo packets;
* the cargo packets are cleaned by CargoPacket's CleanPool.
*/
template <class Tinst>
void CargoList<Tinst>::OnCleanPool()
{
this->packets.clear();
}
/**
* Update the cached values to reflect the removal of this packet.
* Decreases count and days_in_transit.