FWH 11.01: Memory leak in DIALOG with MENU?

FWH 11.01: Memory leak in DIALOG with MENU?

Postby IBTC » Tue Feb 15, 2011 5:36 pm

Hello!

This simple code:

Code: Select all  Expand view
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  Expand view
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  Expand view
MENU oMenu 2007


this:

Code: Select all  Expand view
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
IBTC
 
Posts: 103
Joined: Sat Oct 18, 2008 8:13 pm
Location: Stuttgart, Germany

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

Postby TimStone » Tue Mar 15, 2011 3:32 am

Bumped up for Daniel
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

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

Postby Daniel Garcia-Gil » Tue Mar 15, 2011 4:56 am

Hello

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

windows.prg

line 2026
Code: Select all  Expand view
  if ::hWnd == nil .or. ::hWnd == 0


change to

Code: Select all  Expand view
  if ( ::hWnd == nil .or. ::hWnd == 0 ) .and. ( ::nResult == NIL .or. ::nResult == 0 )


please test to update fivewin sources
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

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

Postby IBTC » Tue Mar 15, 2011 7:52 pm

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
User avatar
IBTC
 
Posts: 103
Joined: Sat Oct 18, 2008 8:13 pm
Location: Stuttgart, Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 101 guests