Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2003:
[Freeciv-Dev] Re: (PR#6597) Huge memory leak with autogame
Home

[Freeciv-Dev] Re: (PR#6597) Huge memory leak with autogame

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#6597) Huge memory leak with autogame
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Wed, 22 Oct 2003 02:03:23 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On Tue, Oct 21, 2003 at 11:37:53PM -0700, Raimar Falke wrote:
> 
> 
> I'm running an autogame with the rc-bug from the PR#6260 thread. The
> civserver process enlarged itself to 710MB before it got killed.

Found it. Please check and apply.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  "Heuer's Law: Any feature is a bug unless it can be turned off."

Index: ai/aidiplomat.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/aidiplomat.c,v
retrieving revision 1.25
diff -u -u -r1.25 aidiplomat.c
--- ai/aidiplomat.c     2003/10/13 07:30:57     1.25
+++ ai/aidiplomat.c     2003/10/22 09:00:00
@@ -165,8 +165,8 @@
     pft_fill_default_parameter(&parameter);
     pft_fill_unit_parameter(&parameter, punit);
     map = pf_create_map(&parameter);
-
     find_city_to_diplomat(pplayer, punit, &acity, &time_to_dest, map);
+    pf_destroy_map(map);
 
     if (acity == NULL || BV_ISSET(ai->stats.diplomat_reservations, acity->id)) 
{
       /* Found no target or city already considered */
@@ -679,4 +679,5 @@
       }
     }
   }
+  pf_destroy_map(map);
 }

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