FWH 11.01: Memory leak in DIALOG with MENU?

Post Reply
User avatar
IBTC
Posts: 103
Joined: Sat Oct 18, 2008 8:13 pm
Location: Stuttgart, Germany
Contact:

FWH 11.01: Memory leak in DIALOG with MENU?

Post by IBTC »

Hello!

This simple code:

Code: Select all

FUNCTION MAIN()

   LOCAL oDlg

   SetResDebug()

   DEFINE DIALOG oDlg FROM 1, 1 TO 22, 75 ;
      TITLE "Test"

   ACTIVATE DIALOG oDlg;
      ON INIT oDlg:SetMenu( SetDlgMenu() )

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

return(0)

//----------------------------------------------------------------------------//

function SetDlgMenu()

   local oMenu

   MENU oMenu

      MENUITEM "Item 1"

   ENDMENU

return oMenu
produce now in FWH 11.01 this:

Code: Select all

02/15/11 18:35:17: BRUSH,1432,TDIALOG:SETCOLOR(2477)->TDIALOG:NEW(196)->MAIN(13)
    
02/15/11 18:35:17: FONT,1508,TDIALOG:GETFONT(2751)->TDIALOG:INITIATE(633)->TDIALOG:HANDLEEVENT(917)->DIALOGBOXINDIRECT(0)->TDIALOG:ACTIVATE(273)->MAIN(16)
And with

Code: Select all

MENU oMenu 2007
this:

Code: Select all

02/15/11 18:38:08: BRUSH,1432,TDIALOG:SETCOLOR(2477)->TDIALOG:NEW(196)->MAIN(13)
    
02/15/11 18:38:08: FONT,1508,TDIALOG:GETFONT(2751)->TDIALOG:INITIATE(633)->TDIALOG:HANDLEEVENT(917)->DIALOGBOXINDIRECT(0)->TDIALOG:ACTIVATE(273)->MAIN(16)
    
02/15/11 18:38:08: BMP,1624,TWINDOW:HANDLEEVENT(0)->TDIALOG:HANDLEEVENT(933)->DIALOGBOXINDIRECT(0)->TDIALOG:ACTIVATE(273)->MAIN(16)
 
Best Regards,
Ruediger Alich

---
HMG 3.1.3 | FTDN/FWH 13.12 | Harbour 3.2 | BCC/MinGW | Windows XP/Vista/7/8/10 (32/64-Bit), Wine (Linux/Mac) - started 1999 with FW, 1989 with Clipper
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: FWH 11.01: Memory leak in DIALOG with MENU?

Post by TimStone »

Bumped up for Daniel
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
Daniel Garcia-Gil
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita
Contact:

Re: FWH 11.01: Memory leak in DIALOG with MENU?

Post by Daniel Garcia-Gil »

Hello

is Very inofencive memory leak...but you can solve by this way

windows.prg

line 2026

Code: Select all

   if ::hWnd == nil .or. ::hWnd == 0
change to

Code: Select all

   if ( ::hWnd == nil .or. ::hWnd == 0 ) .and. ( ::nResult == NIL .or. ::nResult == 0 )
please test to update fivewin sources
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
User avatar
IBTC
Posts: 103
Joined: Sat Oct 18, 2008 8:13 pm
Location: Stuttgart, Germany
Contact:

Re: FWH 11.01: Memory leak in DIALOG with MENU?

Post by IBTC »

Hi Daniel,
Daniel Garcia-Gil wrote:please test to update fivewin sources
Thanks. It seems that this fix works.

Please don't forget these problems:
Thanks!
Best Regards,
Ruediger Alich

---
HMG 3.1.3 | FTDN/FWH 13.12 | Harbour 3.2 | BCC/MinGW | Windows XP/Vista/7/8/10 (32/64-Bit), Wine (Linux/Mac) - started 1999 with FW, 1989 with Clipper
Post Reply