Home Devices
New Blog Posts: Merging Reports - Part 1 and Part 2

PrintToDevices memory leak?

edited February 2003 in Devices
Hi,

I'm getting quite a few memory leaks when I call printtodevices (just
printing to a text file). I'm freeing everything I see to free. Sleuth is
reporting leaks in ppReport on lines 1827, 1739, and 1702. I don't have
these leaks when printing to the screen or directly to the printer. Here is
the sample code:

frmRpts.ppShipNote.DeviceType := 'dtReportTextFile';
frmRpts.ppShipNote.Print;
frmRpts.ppshipnote.free;
frmRpts.dsDT.Free;
frmRpts.DTPipe.Free;

Thanks for your help.

Ann Jackson

Comments

  • edited February 2003
    Hi Ann,

    what version of ReportBuilder are you using?
    Do you have a memory leak problem, can you confirm Sleuth's finding?

    regards,
    Chris Ueberall;
  • edited February 2003
    Hi Chris,

    Thanks for your reply. I am using RB version 6.03 standard edition with
    Delphi 5 Pro. As far as confirming Sleuth's findings, there is "something"
    going on with the server that started when I deployed a program using the
    printtodevices command. It is periodically freezing up and this program is
    the only thing that has changed since the problem started. The program is
    running about 20 times/day.

    Sleuth reports the leaks in ppReport at lines 1827, 1739, 1702 and ppProd at
    lines 1174, 1129, 1093. Seems to have to do with the publisher ie these:

    1827 Publisher.ReceivePage(Engine.Page);
    1739 Engine.RequestPage(TppPageRequest(aPageRequest));

    etc.

    I thought maybe a file was getting opened without being closed, but I don't
    see any evidence of that happening (while digging thru RB source code).

    Thanks again,

    Ann


  • edited February 2003
    One more thing. I misstated the command that is giving me problems:

    It is the Print command that is printing to a dtReportTextFile.

    Thanks,

    Ann

  • edited February 2003
    Ann,

    memory leaks don't freezes a station periodically. If you have a 24/7 app you
    should make sure there is no memory leak. But in your case they doesn't matter - if there are ones.
    (And yes, multitasking in Windows is a pain, some would say 'a nice try')

    regards,
    Chris Ueberall;
  • edited February 2003
    Hi Chris,

    Thanks for the reply, however it makes no sense. I do not have leaks in my
    source code, the leaks are in the RB print command. I had resolved leaks in
    the print command with CloseDataPipelines, FreeBandsAndGroups,
    FreeDesignControls. I ASSUMED that these commands would still resolve leaks
    when printing to a file. Due to time constraints, I did not discover the
    leaks until after deployment. I have found a solution to this problem--the
    solution in this case is to build the needed text file w/o the rb tools.
    Thanks anyway.

    Ann

  • edited February 2003
    Do you get leaks when running our main reports demo project? Run report
    #107. It prints to ReportTextFile. If you find that it doesn't leak, then
    please send a simple example that shows that RB is leaking to
    support@digital-metaphors.com


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.