delphi - Memory leak on simple HTTPRIO -


i'm having memory leak when quit application on thttprio object created.

i have webservice defined followed:

type   tsimplewebservice = class   protected     fhttprio : thttprio;   public     constructor create(url : string);     property httprio : thttprio read fhttprio;   end;  implementation  constructor tsimplewebservice.create(url : string); begin   fhttprio := thttprio.create(nil);   fhttprio.url := url; end; 

i testing/creating webservice followed (customercare webservice interface):

procedure tfrmmain.button1click(sender: tobject); var   webservice: customercare; begin   webservice := getsimplecustomercareservice;   webservice := nil;   frmmain.close; end;  function tfrmmain.getsimplecustomercareservice: customercare; var   webservice: tsimplewebservice; begin   webservice := tsimplewebservice.create('http://this.is.a.test');   result := webservice.httprio customercare; end; 

when click button1, i'm not doing create webservice, set nil again , quit application. @ point (with reportmemoryleaksonshutdown := true), unexpected memory leak of 12 bytes on tsimplewebservice.

i have tried adding destructor destroy not appear called.

what missing?

thanks input, jan

oh yeah, i'm on xe2 windows 2003. in addition memory leak on tsimplewebservice, memory leak on tdictionary object have no clue 1 coming from. when compile , run same project on xe4/windows 7, tsimplewebservice memory leak.

to answer second question:

oh yeah, i'm on xe2 windows 2003. in addition memory leak on tsimplewebservice, memory leak on tdictionary object have no clue 1 coming from. when compile , run same project on xe4/windows 7, tsimplewebservice memory leak.

there memoryleak in wsdllookup.pas, copy file project , find piece of code

destructor twsdllookup.destroy; begin   clearwsdllookup;   inherited; end; 

change to:

destructor twsdllookup.destroy; begin   clearwsdllookup;   flookup.free;   // missing!!!!   inherited; end; 

as found out, error has been fixed in more recent delphi versions


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -