cancel
Showing results for 
Search instead for 
Did you mean: 

Memory leak in 12.5?

Former Member
0 Kudos

We have had a application that has been running on PB since PB 9. However it looks like in 12.5 the application has started to use a lot of memory? I have had places in the code that have been the same for years suddenly spike up in memory use.

I guess has anyone noticed that 12.5 uses more memory? And does anyone know of any good memory tools to use for PB? I have used some c++ memory tools but they don't really tell me a lot.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Steve;

If your PB application is of the type MDI - you can force the PBVM and MS-Windows loader to free all the application memory when the MDI frame window is minimized. At minimization time, MS-Windows takes all the memory segments that are marked as "not used" and flushes them.

TIP: Implement an MDI Frame auto minimize on the IDLE event to free memory when the user is not active on your application. 

HTH

Regards ... Chris

Former Member
0 Kudos

For one thing, PB 10 and higher are Unicode while PB 9 and lower are Ansi. Every String or Character variable is going to take up twice as much memory. That includes all string properties of windows, userobjects and datawindows.

When a window is closed or other object destroyed, the memory is not released back to the operating system. PB grabs a chunk of memory and manages it's use internally. If it needs more memory, then it grabs more. When objects are closed, the used memory is freed internally but not released. This makes object creation much faster.

Former Member
0 Kudos

Does PB have any awesome tools to hunt down in the code the places that are eating up a lot of memory?

Former Member
0 Kudos

Hi Steven;

  YES if your on PB Classic! Have a look at the Application Profiler feature and the profiling PowerScript command set. For more information on this area, have a look at the "Tracing and Profiling" section in the PB Help files. 

  Also, check out my framework for the performance capturing and display features - now including the System Monitor Console:  Great White North Technical Evangelist: STD Framework Release 

Regards ... Chris