FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Problem with Dialog, memory?
Posts: 13
Joined: Wed Dec 07, 2005 05:54 PM
Problem with Dialog, memory?
Posted: Wed Dec 13, 2006 09:32 AM

In my application after open and close many times dialogs (with many objects tree, btnbmp, txbrowse ecc) happens that the same dialogs are not created and I've to restart the application and the dialogs are well created.

Is due to lack of memory?
How is possible to solve the problem?

XHB & FWH October 2006

Thank you
Riccardo

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Problem with Dialog, memory?
Posted: Wed Dec 13, 2006 09:51 AM

Riccardo,

Do you use bitmaps, fonts, brushes ? (GDI objects)

If yes, how do you manage them ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 13
Joined: Wed Dec 07, 2005 05:54 PM
Problem with Dialog, memory?
Posted: Wed Dec 13, 2006 11:59 AM

We use Fonts and Bitmaps, calling end() method after close the dialog.
We use folder and a lot of TBtnBmp.

Don't use Brushes.

Thank you.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Problem with Dialog, memory?
Posted: Wed Dec 13, 2006 12:29 PM

Riccardo,

The problem you describe is a typicall problem when GDI objects are not properly released. Could you provide some samples of your dialogs so we may review their code ? Thanks,

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 218
Joined: Fri Oct 07, 2005 01:55 AM
Problem with Dialog, memory?
Posted: Wed Dec 13, 2006 01:32 PM
Antonio Linares wrote:Riccardo,

The problem you describe is a typicall problem when GDI objects are not properly released. Could you provide some samples of your dialogs so we may review their code ? Thanks,


Hello Antonio,

Sometimes I have same as problem.
But my dialog can work, bitmap TSButton's bitmap disappear.
May I send to you my Dialog code?

Regards,

Richard
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Problem with Dialog, memory?
Posted: Wed Dec 13, 2006 06:18 PM

Richard,

That error happens when you are consuming a lot of GDI resources without properly releasing them. There are several available tools to check the consumed GDI resources:

http://downloads.zdnet.com/download.asp ... cid=212595

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 218
Joined: Fri Oct 07, 2005 01:55 AM
Problem with Dialog, memory?
Posted: Thu Dec 14, 2006 02:54 AM

Hello Anonio,

Thanks for your help.
I will try to download it.

Richard

Continue the discussion