Problem with Dialog, memory?

Post Reply
Riccardo
Posts: 13
Joined: Wed Dec 07, 2005 5:54 pm

Problem with Dialog, memory?

Post by Riccardo »

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

Post by Antonio Linares »

Riccardo,

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

If yes, how do you manage them ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
Riccardo
Posts: 13
Joined: Wed Dec 07, 2005 5:54 pm

Post by Riccardo »

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

Post by Antonio Linares »

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
Taiwan
Posts: 218
Joined: Fri Oct 07, 2005 1:55 am
Location: Taipei, Taiwan
Contact:

Post by Taiwan »

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
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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
Taiwan
Posts: 218
Joined: Fri Oct 07, 2005 1:55 am
Location: Taipei, Taiwan
Contact:

Post by Taiwan »

Hello Anonio,

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

Richard
Post Reply