On 27.12.2016 23:37, Michael T. Pope wrote: Hi,
> 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. Okay. OTOH, we could use that as an indication for whether a settlement is on the map - at least for testing. In the opposite direction (adding to the map) we could add a sanity check (maybe assert). > Furthermore, on occasion when I have tried to > agressively clean up dangling references it has caused problems > (especially with the owner-player field). Could you explain it more in detail ? What went wrong here ? >> 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. Ah, guessed so. I put another topic on my todo list: check whether there's room for optimization (eg. avoid id in favour of coordinates where possible, flatten the array, etc) --mtx ------------------------------------------------------------------------------ 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