FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Memory leak with last xbrowse
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Memory leak with last xbrowse
Posted: Tue Jan 04, 2011 02:57 PM
Marco Turco wrote:Great !! Adding oFld:SetFont( oWnd:oFont ) all seem to runs well (tested on 1000 open/close).

Do you think could it be possible to fix directly the tFolder class (or the FWH class related to the problem) ?

Can you kindly take the additional trouble of testing this change with the older version of FWH and see if font resources remain unreleased?
Regards



G. N. Rao.

Hyderabad, India
Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
Re: Memory leak with last xbrowse
Posted: Tue Jan 04, 2011 03:14 PM

Hi Rao,
it isn't very clear what you mean.
With FWH oct 2009 all runs well with or without the oFld:Setfont(oWnd:oFont) addition.

Best Regards,



Marco Turco

SOFTWARE XP LLP
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Memory leak with last xbrowse
Posted: Tue Jan 04, 2011 05:48 PM
Andre,

The code below seems to work fine. There is no bold font and there is no memory leak. So there must be something in your code causing the problem.

Regards,
James

Code (fw): Select all Collapse
#include "fivewin.ch"

function main()
   local oWnd,oBtn

   define window oWnd
   @1,1 button oBtn action consultas()
   activate window oWnd

   FERASE("CHECKRES.TXT")
   CHECKRES()
    winExec("notepad .\checkres.txt")
return nil

FUNCTION Consultas()
   LOCAL oFnt, oDlg
   DEFINE FONT oFnt NAME "Ms Shell Dlg" SIZE 0, -10
   DEFINE DIALOG oDlg OF wndMain() FONT oFnt
   @ 1,1 say "test font" of oDlg
   ACTIVATE DIALOG oDlg
   oDlg := NIL
   oFnt:end()
RETURN ( NIL )
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 368
Joined: Sun May 31, 2009 06:25 PM
Re: Memory leak with last xbrowse
Posted: Wed Jan 05, 2011 02:09 PM

James,

With your sample I found something interesting: if I add @1,1 button oBtn action NIL to the main window of my app the problem goes away!

Andre

Regards,



André Dutheil

FWH 13.04 + HB 3.2 + MSVS 10

Continue the discussion