Memory Leak Using COM

Discussions about GdPicture.NET usage in non managed applications built in vb6, Delphi, vfp, MFC c++ etc...
Post Reply
wsoul2k
Posts: 2
Joined: Thu Mar 14, 2019 9:10 pm

Memory Leak Using COM

Post by wsoul2k » Thu Mar 14, 2019 9:17 pm

I'm having memory leak using the TGdPicturePDF class with delphi

When using the interface _GdPicturePDF it is ok.... but we dont have events using interface

Simple code

Code: Select all

procedure TForm1.Button1Click(Sender: TObject);
var
  LicenseManager: TLicenseManager;
  opdf :TGdPicturePDF; //Class of TOleServer
begin

ReportMemoryLeaksOnShutdown:=true;

// turn off Floating point exceptions
Set8087CW($133f);

LicenseManager := TLicenseManager.Create(nil);
LicenseManager.RegisterKey('YOUR KEY HERE');

opdf:= TGdPicturePDF.Create(nil);
opdf.LoadFromFile('ANY PDF YOU WANT HERE',true);

opdf.OcrPages_3('*',0,'por','C:\GdPicture.NET 14\Redist\OCR\','',200,1,true);
opdf.SaveToFile('C:\TestPDF\resultPDF.pdf');
opdf.CloseDocument;
opdf.Dispose;

//releasing the PDF
FreeAndNil(opdf);

//releasing the Lincense
FreeAndNil(LicenseManager);

end;

when closing the application always get
---------------------------
Unexpected Memory Leak
---------------------------
An unexpected memory leak has occurred. The unexpected small block leaks are:
13 - 20 bytes: TServerEventDispatch x 1

anyone can help me out

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest