# HG changeset patch # User sheepluva # Date 1301408695 -7200 # Node ID d2684b6f02cea403c5d0684e15f202073aafe2d7 # Parent 0c2c509ccc7b17ba026bb7492ab36e686e62c3ff fix leaking of hand-drawn maps diff -r 0c2c509ccc7b -r d2684b6f02ce hedgewars/hwengine.pas --- a/hedgewars/hwengine.pas Mon Mar 28 20:13:03 2011 -0400 +++ b/hedgewars/hwengine.pas Tue Mar 29 16:24:55 2011 +0200 @@ -390,6 +390,7 @@ uIO.freeModule; //stub uLand.freeModule; + uLandPainted.freeModule; uCommandHandlers.freeModule; uCommands.freeModule; diff -r 0c2c509ccc7b -r d2684b6f02ce hedgewars/uLandPainted.pas --- a/hedgewars/uLandPainted.pas Mon Mar 28 20:13:03 2011 -0400 +++ b/hedgewars/uLandPainted.pas Tue Mar 29 16:24:55 2011 +0200 @@ -24,6 +24,7 @@ procedure Draw; procedure initModule; +procedure freeModule; implementation uses uLandGraphics, uConsts, uUtils, SDLh, uCommands, uDebug; @@ -171,4 +172,16 @@ RegisterVariable('draw', vtCommand, @chDraw, false); end; +procedure freeModule; +var pe, pp: PPointEntry; +begin + pe:= pointsListHead; + while(pe <> nil) do + begin + pp:= pe; + pe:= pe^.next; + dispose(pp); + end; +end; + end.