Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: [PATCH] Small improvement at genlist and maphand
Home

[Freeciv-Dev] Re: [PATCH] Small improvement at genlist and maphand

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] Small improvement at genlist and maphand
From: Falk Hueffner <falk.hueffner@xxxxxxxxxxxxxxxxxxxxxxxx>
Date: 25 Aug 2001 19:24:10 +0200

Alan Schmitt <alan.schmitt@xxxxxxxx> writes:

> * Vasco Alexandre Da Silva Costa (vasc@xxxxxxxxxxxxxx) wrote:
> > Yes. Unfortunately it introduces new problems. Most GC's are dumb so
> > you must set all pointers that point to a piece of mem to NULL so the
> > GC can see that the memory isn't used anymore. GC's are also often slow
> > when doing the garbage collecting step. I should know about that as a
> > former LISP programmer :-)
> > Sure its easy to use. But it isn't perfect.
>
> Modern GC (incremental, with several generations) can be pretty fast
> (such as the one in ocaml), and they can be pretty smart (ie collect
> everything automatically) when the language was designed with automatic
> memory management in mind.

I'm not generally opposed to garbage collecting, but I don't see what
it would gain us here. There couldn't be any more references to freed
memory, OK, but instead we'd had references to already dead units,
which isn't much better. One would have to check if the unit isn't
actually dead before doing anything all the time.

        Falk



[Prev in Thread] Current Thread [Next in Thread]