On Tue, 27 Dec 2016 12:58:48 +0100
"Enrico Weigelt, metux IT consult" <enrico.weig...@gr13.net> wrote:
> just had a look at Settlement::exciseSettlement(), which removes a
> settlement from the map, so eg. removing tile ownerships, etc
> 
> But it doesn't seem to clear the tile reference (this.tile).
> 
> Is that really correct ?

Yes, or at least harmless.  The routine does what it says --- "removes
the settlement from the map".  It does not remove all reference to the map
from the settlement, that is something else.  Almost certainly, any
settlement this routine is called on is in the process of being removed
from the game, so a few dangling backward references to the tile et al are
not going to matter.  Furthermore, on occasion when I have tried to
agressively clean up dangling references it has caused problems
(especially with the owner-player field).

> By the way: how are tiles identified in client-server communication?
> Coordinates ? Some other key ?

id.  See FreeColObject, and note the use of Game.freeColGameObjects.  id is
fundamental.

Cheers,
Mike Pope

Attachment: pgpDlRB4Rwa1v.pgp
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Freecol-developers mailing list
Freecol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freecol-developers

Reply via email to