Not Releasing Font

Re: Not Releasing Font

Postby nageswaragunupudi » Fri Sep 02, 2011 8:17 am

Mr Uwe
Thanks. When we set xbrowse's font with the statement oBrw:SetFont( oFont ), the font is not released.
But if we assign font to browse in the command syntax
REDEFINE XBROWSE .... FONT oFont, the font is properly released.

We need to find a proper fix for releasing the font when set by oBrw:SetFont()

May I also know if you faced such a problem with brushes? If so can you post a small sample code?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10330
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Not Releasing Font

Postby ukservice » Fri Sep 02, 2011 10:50 am

Hello.

Latest build still is not releasing all resources:


BMP,-268102622,TWINDOW:HANDLEEVENT(0)->_FWH(3443)->SHOWWINDOW(0)->TWINDOW:ACTIVATE(978)->MAIN(524)
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
User avatar
ukservice
 
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

Re: Not Releasing Font

Postby nageswaragunupudi » Fri Sep 02, 2011 11:41 am

Please provide a small sample program please
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10330
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Not Releasing Font

Postby ukoenig » Fri Sep 02, 2011 11:59 am

Mr. Rao,

I'm working on a all in one-solution, to test any control from Window or Dialog.
Easy to include any created new Control.
I still need a little bit time, because I have to collect different parts from my other Tools
for this new one.

Best Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Not Releasing Font

Postby nageswaragunupudi » Fri Sep 02, 2011 1:34 pm

This sample reproduces non-release of font mentioned by Ukservice.
Code: Select all  Expand view
#include "fivewin.ch"

function Main()

   local oWnd, oMenu

   FERASE( "checkres.txt" )

   MENU oMenu 2007
      MENUITEM "&Main"
      MENU
         MENUITEM "Quit" ACTION WndMain():End()
      ENDMENU
   ENDMENU

   DEFINE WINDOW oWnd MENU oMenu
   ACTIVATE WINDOW oWnd

   CHECKRES()

return nil
 

The bitmap created for menu 2007 (or 2010) is not released.
There is no issue with Menu without 2007/2010 clause.

This is yet to be fixed.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10330
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Not Releasing Font

Postby Antonio Linares » Fri Sep 02, 2011 9:03 pm

As a temporary workaround, this line fixes it:

Code: Select all  Expand view
   ...
 
   ACTIVATE WINDOW oWnd

   oMenu:End()  // removes the unreleased menu bitmap !!!

   CHECKRES()

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41462
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Not Releasing Font

Postby ukservice » Fri Sep 02, 2011 10:23 pm

Thank you.

But why FWH does not liberate all resources before quit?.
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
User avatar
ukservice
 
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

Re: Not Releasing Font

Postby Antonio Linares » Sat Sep 03, 2011 3:29 am

John,

FWH releases all resources before exit, it just reports it and then removes all of them
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41462
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Not Releasing Font

Postby ukoenig » Fri Sep 09, 2011 5:46 pm

A Solution, to test all Controls ( designed, to detect Painting-problems ).
Because very often, there is a Question for a Sample, to find a Solution of a Problem.
To make testing easier, I will place a Downloadlink with the full Source.
You don't need to define Window- or Dialog-brushes for testing.
There is a Main-window to create and select a Brush.
The Window includes a Ribbonbar and Explorerbar ( easy to add more ).
From the Main-window, You can select < DIALOG >.
This part includes a Main-dialog and 2 Child-dialogs.
The Background of the 2 Childs can be selected and defined from the Main-dialog.
You can switch between the 2 Childs.
The 2. Child-dialog is still empty, to include more Tests.

The 1. Child-dialog will include Tests of :
Buttonbar, TFolderEx,TFolder, Radio, Checkbox, Combobox, Say, Get and xBrowse.

You don't have to start every Time from Beginning, to create a Sample.
Just include the Test to the Window or 2. Child-dialog.

Image

Image

Image

Best Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Not Releasing Font

Postby Cgallegoa » Fri Sep 09, 2011 6:22 pm

Hi Uwe,

To make testing easier, I will place a Downloadlink with the full Source.


Where is "Downloadlink" ?

Regards,

Carlos Gallego
Saludos,

Carlos Gallego

*** FWH-23.10, xHarbour 1.2.3 Build 20190603, Borland C++7.30, PellesC ***
Cgallegoa
 
Posts: 426
Joined: Sun Oct 16, 2005 3:32 am
Location: Quito - Ecuador

Re: Not Releasing Font

Postby ukoenig » Fri Sep 09, 2011 6:29 pm

Carlos,
it is nearly finished ( still some Tests ) the Link will be included in a short time.

Testing transparent Controls on different Backgrounds ( problems on some Combinations ) :

Image

Best Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 141 guests