Page 2 of 2

Re: Not Releasing Font

PostPosted: Fri Sep 02, 2011 8:17 am
by nageswaragunupudi
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?

Re: Not Releasing Font

PostPosted: Fri Sep 02, 2011 10:50 am
by ukservice
Hello.

Latest build still is not releasing all resources:


BMP,-268102622,TWINDOW:HANDLEEVENT(0)->_FWH(3443)->SHOWWINDOW(0)->TWINDOW:ACTIVATE(978)->MAIN(524)

Re: Not Releasing Font

PostPosted: Fri Sep 02, 2011 11:41 am
by nageswaragunupudi
Please provide a small sample program please

Re: Not Releasing Font

PostPosted: Fri Sep 02, 2011 11:59 am
by ukoenig
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:

Re: Not Releasing Font

PostPosted: Fri Sep 02, 2011 1:34 pm
by nageswaragunupudi
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.

Re: Not Releasing Font

PostPosted: Fri Sep 02, 2011 9:03 pm
by Antonio Linares
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

Re: Not Releasing Font

PostPosted: Fri Sep 02, 2011 10:23 pm
by ukservice
Thank you.

But why FWH does not liberate all resources before quit?.

Re: Not Releasing Font

PostPosted: Sat Sep 03, 2011 3:29 am
by Antonio Linares
John,

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

Re: Not Releasing Font

PostPosted: Fri Sep 09, 2011 5:46 pm
by ukoenig
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:

Re: Not Releasing Font

PostPosted: Fri Sep 09, 2011 6:22 pm
by Cgallegoa
Hi Uwe,

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


Where is "Downloadlink" ?

Regards,

Carlos Gallego

Re: Not Releasing Font

PostPosted: Fri Sep 09, 2011 6:29 pm
by ukoenig
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: