1. Erick Bergsma
  2. PowerBuilder
  3. Tuesday, 5 January 2021 14:17 PM UTC

Happy New Year all...

PowerBuilder 2017: R3: 1880...

I recently converted a report from a .TXT file to a PDF.

We are now seeing that the process that creates these PDFs has exponentially made an existing memory leak issue worse.  We are still creating the original TXT report and the PDF report for a time...just in case...

The original report also has a memory leak, but the PDF is worse, and since we are creating both reports in the same process, its basically doubled the leak issue.

I created a .PBP file ...

I am using the Profiling Class View to try and figure out where the leak might be... but I'm really not understanding how to read it.

For example...

...however, in my code I have CREATE logic like this...

...which I don't see in the Profiling View Class window.

This is a non-visual process that reacts to messages it is being sent.  For this new PDF report, I have not created any new datastores.  I am re-using the same data sets as the original report, just building a composite report and doing a Save As ...

So... how do I read this Profile View, to try and understand if there are objects that has CREATE logic, but no DESTROY logic.

Any help or direction would be appreciated...

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 5 January 2021 16:40 PM UTC
  2. PowerBuilder
  3. # 1

Hi Erick;

  Yes, whenever you CREATE an object class you should always issue a corresponding DESTROY command! Don't always trust garbage collection (just my$0.02). Also, the same for User Objects and Tab Pages .. whenever you perform an OpenUserObject() or OpenTabPage() command you should always issue a corresponding CloseUserObject() and CloseTagPage() command.

FWIW: For any DW Control or DataStore in the Destructor event, I always use ...

  • DC/DS.Reset()   // Unload DWO buffers
  • DC/DS.DatObject = ""  // Unload DWO source

HTH

Regards ... Chris

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.