FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Checking up the system memory
Posts: 22
Joined: Mon May 19, 2008 08:54 PM
Checking up the system memory
Posted: Wed May 20, 2009 08:51 PM

Hi guys,

Today i was building a new routine in my system and unfortunately I took a look at the system memory, wow, what i could is even after finished that routine my app was using the same memory as before(running the routine).

So I closed my app and opened it again, the memory at this time was something around 6.334 kb. So i started surfing around my system(just opening somethings and closing) and checking the memory at the same time, the memory was just incrising never getting low again.

I'm confused now.

Does fivewin or xharbour clean memory after finished a routine? Or just clean up when the app is closed?

Regards,
Diego

regards,



Diego Imenes
Posts: 654
Joined: Fri Oct 21, 2005 05:54 AM
Re: Checking up the system memory
Posted: Wed May 20, 2009 11:43 PM

Hi Diego,

If you are using Images, Brushes, Fonts, Timers in your application, you have to end their
handles immediately after closing their parent Window/Dialog.

DEFINE BRUSH oBrush RESOURCE "myresource"
DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 0, -9
...
..
oFont:End()
or
RELEASE oFont

oBrush:End()
or
RELEASE oBrush

Otherwise they keep consuming the GDI Resource memory and maintains
memory leakage. And also your System memory can not be regained even
after closing your application

Hope you understood.

Regards,

  • Ramesh Babu P

Continue the discussion