… | |
… | |
880 | * Remove and free all objects in the given map. |
880 | * Remove and free all objects in the given map. |
881 | */ |
881 | */ |
882 | void |
882 | void |
883 | maptile::clear () |
883 | maptile::clear () |
884 | { |
884 | { |
885 | sfree (regions, size ()), regions = 0; |
885 | sfree (regions, size ()); regions = 0; |
886 | free (regionmap), regionmap = 0; |
886 | delete [] regionmap; regionmap = 0; |
887 | |
887 | |
888 | if (spaces) |
888 | if (spaces) |
889 | { |
889 | { |
890 | for (mapspace *ms = spaces + size (); ms-- > spaces; ) |
890 | for (mapspace *ms = spaces + size (); ms-- > spaces; ) |
891 | while (object *op = ms->bot) |
891 | while (object *op = ms->bot) |