From 3b85bc30e66f60fddd9898c443377e5c0b3607f5 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Mon, 25 Jun 2018 17:29:45 +0000 Subject: [PATCH] lazMapViewer: Fix memory leak in example/MapViewer_Demo git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6531 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/lazmapviewer/example/MapViewer_Demo.lpi | 1 - components/lazmapviewer/example/main.lfm | 4 ++-- components/lazmapviewer/example/main.pas | 1 + components/lazmapviewer/source/mvcache.pas | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/lazmapviewer/example/MapViewer_Demo.lpi b/components/lazmapviewer/example/MapViewer_Demo.lpi index 2b0a0e7b0..429c5c771 100644 --- a/components/lazmapviewer/example/MapViewer_Demo.lpi +++ b/components/lazmapviewer/example/MapViewer_Demo.lpi @@ -13,7 +13,6 @@ - diff --git a/components/lazmapviewer/example/main.lfm b/components/lazmapviewer/example/main.lfm index 293b0b073..659292085 100644 --- a/components/lazmapviewer/example/main.lfm +++ b/components/lazmapviewer/example/main.lfm @@ -364,7 +364,7 @@ object MainForm: TMainForm end object GeoNames: TMVGeoNames OnNameFound = GeoNamesNameFound - left = 520 - top = 288 + left = 416 + top = 232 end end diff --git a/components/lazmapviewer/example/main.pas b/components/lazmapviewer/example/main.pas index 943ffa2c2..291521d0a 100644 --- a/components/lazmapviewer/example/main.pas +++ b/components/lazmapviewer/example/main.pas @@ -204,6 +204,7 @@ end; procedure TMainForm.FormDestroy(Sender: TObject); begin WriteToIni; + ClearFoundLocations; end; procedure TMainForm.FormShow(Sender: TObject); diff --git a/components/lazmapviewer/source/mvcache.pas b/components/lazmapviewer/source/mvcache.pas index 18bfbcf74..59bee01b3 100644 --- a/components/lazmapviewer/source/mvcache.pas +++ b/components/lazmapviewer/source/mvcache.pas @@ -49,7 +49,7 @@ Type public Procedure CheckCacheSize(Sender: TObject); constructor Create(aOwner: TComponent); override; - destructor destroy; override; + destructor Destroy; override; Procedure Add(MapProvider: TMapProvider; const TileId: TTileId; Stream: TMemoryStream); Procedure GetFromCache(MapProvider: TMapProvider; const TileId: TTileId; out img: TLazIntfImage); function InCache(MapProvider: TMapProvider; const TileId: TTileId): Boolean;