How to resolve reported leak after emailing
Hi All,
D2007, RB 10.06 Ent, ppSMTPIndy10, FastMM4.
I have a fairly simple app that generates a staff rota(roster) and emails
each staff member their own copy. I always get the memory leak, shown below,
reported on shutdown.
The report component is generated in code, the template loaded from DB. The
same report instance is used for the duration of the run with only an
autosearchfield value changed for each different recipient.
I have tried it both with the built in RB PDF and also ExtraDevices PDFFile.
3 emails using built in RB PDF
This application has leaked memory. The small block leaks are (excluding
expected leaks registered by pointer):
5 - 12 bytes: TIdThreadSafeInteger x 1
13 - 20 bytes: TppPDFProcSet x 3, TppPDFGState x 3, TppPDFCatalog x 3
21 - 28 bytes: TIdCriticalSection x 2, TppPDFPageTree x 3
29 - 36 bytes: TppPDFInfo x 3
4 emails generated using ExtraDevices PDFFile
5 - 12 bytes: TIdThreadSafeInteger x 1
13 - 20 bytes: TppPDFCatalog x 4, TppPDFProcSet x 4, TppPDFGState x 4
21 - 28 bytes: TIdCriticalSection x 2, TppPDFPageTree x 4
29 - 36 bytes: TppPDFInfo x 4
Any pointers please on how to avoid this please.
Regards, Paul.
D2007, RB 10.06 Ent, ppSMTPIndy10, FastMM4.
I have a fairly simple app that generates a staff rota(roster) and emails
each staff member their own copy. I always get the memory leak, shown below,
reported on shutdown.
The report component is generated in code, the template loaded from DB. The
same report instance is used for the duration of the run with only an
autosearchfield value changed for each different recipient.
I have tried it both with the built in RB PDF and also ExtraDevices PDFFile.
3 emails using built in RB PDF
This application has leaked memory. The small block leaks are (excluding
expected leaks registered by pointer):
5 - 12 bytes: TIdThreadSafeInteger x 1
13 - 20 bytes: TppPDFProcSet x 3, TppPDFGState x 3, TppPDFCatalog x 3
21 - 28 bytes: TIdCriticalSection x 2, TppPDFPageTree x 3
29 - 36 bytes: TppPDFInfo x 3
4 emails generated using ExtraDevices PDFFile
5 - 12 bytes: TIdThreadSafeInteger x 1
13 - 20 bytes: TppPDFCatalog x 4, TppPDFProcSet x 4, TppPDFGState x 4
21 - 28 bytes: TIdCriticalSection x 2, TppPDFPageTree x 4
29 - 36 bytes: TppPDFInfo x 4
Any pointers please on how to avoid this please.
Regards, Paul.
This discussion has been closed.
Comments
Thank you for pointing this out. There is now a patch available for RB
10.07 that fixes the PDF device leaks when emailing a report. Send an email
to support@digial-metaphors.com requesting the patch and we'll get it to you
asap. Note that this patch will only work with RB 10.07.
After some research I found that the Tid (indy) leaks are intentional. It
seems they can be removed from your log by upgrading to the latest version
or recompiling with IDFREEONFINAL defined.
http://qc.borland.com/wc/qcmain.aspx?d=22148
http://delphi.newswhat.com/geoxml/forumgetmessage?groupname=borland.public.delphi.internet.winsock&messageid=4730f407$1@newsgroups.borland.com
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thanks for your assistance. I have sent the email requesting the patch.
Also, thanks for your help and links regarding the other leaks from Indy,
very useful.
Great support once again, cheers!
Regards, Paul.