简体   繁体   中英

Memoryleak when using Geocode

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM