Problem with Dialog, memory?

Problem with Dialog, memory?

Postby Riccardo » Wed Dec 13, 2006 9: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
Riccardo
 
Posts: 13
Joined: Wed Dec 07, 2005 5:54 pm

Postby Antonio Linares » Wed Dec 13, 2006 9: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Riccardo » 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.
Riccardo
 
Posts: 13
Joined: Wed Dec 07, 2005 5:54 pm

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Taiwan » Wed Dec 13, 2006 1: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
User avatar
Taiwan
 
Posts: 218
Joined: Fri Oct 07, 2005 1:55 am
Location: Taipei, Taiwan

Postby Antonio Linares » Wed Dec 13, 2006 6: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Taiwan » Thu Dec 14, 2006 2:54 am

Hello Anonio,

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

Richard
User avatar
Taiwan
 
Posts: 218
Joined: Fri Oct 07, 2005 1:55 am
Location: Taipei, Taiwan


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 103 guests