Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2002:
[Freeciv-Dev] Re: Wonder obsolesence across games (PR#1434)
Home

[Freeciv-Dev] Re: Wonder obsolesence across games (PR#1434)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Wonder obsolesence across games (PR#1434)
From: Per I Mathisen <per@xxxxxxxxxxx>
Date: Thu, 16 May 2002 09:16:54 -0700 (PDT)

On Tue, 14 May 2002, Ben Webb wrote:
>       Well, I can't speak for the player maps, lists, etc. but you're
> right about the impr-gen vectors. The World- and Island-range vectors
> are not freed properly. Sorry. ;) See attached patch, which fixes this.

Having looked at the patches in this thread in context, I must say I like
this one best. Except the cleanup function should be in
common/improvement.c and be called improvement_free(), as this isn't
necessarily a "game cleanup" (it could be a rule reload), and it should be
called from server/ruleset.c:free_rulesets() as well.

Lastly, you should add

+  impr_type_iterate(i) {
+    free(improvement_types[i].helptext);
+    improvement_types[i].helptext = NULL;
+  } impr_type_iterate_end;

to improvement_free().

I'm working on fixing the other offenders as part of my ongoing ruleset
cleanup.

Yours,
Per

"As Israeli forces pursued militants, civilians
continued getting in the way and dying as a
result." -- New York Times, April 21




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