FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Not Releasing Font
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Not Releasing Font
Posted: Fri Sep 02, 2011 08: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
Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM
Re: Not Releasing Font
Posted: 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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Not Releasing Font
Posted: Fri Sep 02, 2011 11:41 AM

Please provide a small sample program please

Regards



G. N. Rao.

Hyderabad, India
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Not Releasing Font
Posted: 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.
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Not Releasing Font
Posted: Fri Sep 02, 2011 01:34 PM
This sample reproduces non-release of font mentioned by Ukservice.
Code (fw): Select all Collapse
#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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Not Releasing Font
Posted: Fri Sep 02, 2011 09:03 PM
As a temporary workaround, this line fixes it:

Code (fw): Select all Collapse
    ...
  
   ACTIVATE WINDOW oWnd

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

   CHECKRES()

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM
Re: Not Releasing Font
Posted: 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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Not Releasing Font
Posted: Sat Sep 03, 2011 03: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
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Not Releasing Font
Posted: Fri Sep 09, 2011 05: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.







Best Regards
Uwe :-)
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.
Posts: 514
Joined: Sun Oct 16, 2005 03:32 AM
Re: Not Releasing Font
Posted: Fri Sep 09, 2011 06: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-25.12, xHarbour 1.3.1 Build 20241008, Borland C++7.70, PellesC, ADS 11.1***

Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Not Releasing Font
Posted: Fri Sep 09, 2011 06: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 ) :



Best Regards
Uwe :-)
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.

Continue the discussion