1

Every time I use

GMGeoCode.Geocode(lAddress);

Where lAddress is an existing address found in a database, I get a memoryleak If I do everything else on the for except the GMGeoCode.Geocode(lAddress); the leak isn't there

Is there something that I should free after calling Geocode?

OZ8HP
  • 1,443
  • 4
  • 31
  • 61

1 Answers1

1

The 1.1.0 release don't have this bug fixed. You need to download the last version in SVN repository or change the destructor of TAddressComponentsList in unit GMGeoCode by this line with this:

destructor TAddressComponentsList.Destroy;
begin
  if Assigned(FAddrComponents) then FreeAndNil(FAddrComponents);

  inherited;
end;

Regards

cadetill
  • 1,552
  • 16
  • 24
  • That made quite a difference if Assigned(FAddrComponents) then TObjectList.Create; and if Assigned(FAddrComponents) then FreeAndNil(FAddrComponents); – OZ8HP Jul 29 '13 at 14:30