FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Last FWH version. Memory leak.
Posts: 103
Joined: Sat Oct 18, 2008 08:13 PM
Re: Last FWH version. Memory leak.
Posted: Sat Feb 09, 2013 08:56 PM
Antonio,

Antonio Linares wrote:
IBTC wrote:Instead of removing such code, please change the Method End() in Class TComboBox this way:

METHOD End() INLINE ::Hide(), If( ::oGet != nil, ::End(),), Super:End()


Thanks. But with this change the problem with fonts/memory leak still exists.
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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Last FWH version. Memory leak.
Posted: Mon Feb 11, 2013 01:53 PM

Ruediger,

Could you please provide a small test to reproduce the memory leak here ? thanks :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Last FWH version. Memory leak.
Posted: Mon Feb 11, 2013 04:22 PM

I have had toolbar icons disappear due to memory leaks in the past. One way to test it is to create a memory leak intentionally so you can run the program and keep triggering the memory leak until the icons disappear.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Last FWH version. Memory leak.
Posted: Mon Feb 11, 2013 04:49 PM
You can easily check if an application is experiencing GDI objects handles leaking from here:



Trying to find the same option in Windows 8... :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Last FWH version. Memory leak.
Posted: Mon Feb 11, 2013 04:53 PM
Found :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Last FWH version. Memory leak.
Posted: Mon Feb 11, 2013 05:21 PM

Antonio,

Will you explain what exactly you found?

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Last FWH version. Memory leak.
Posted: Mon Feb 11, 2013 06:08 PM

James,

How to monitor the GDI objects consumed by an application, reported from the Windows task manager :-)

If there is a GDI objects handles leaking, that amount will keep increasing

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 284
Joined: Mon Oct 24, 2005 08:04 PM
Re: Last FWH version. Memory leak.
Posted: Tue Feb 12, 2013 07:46 PM
Antonio Linares wrote:James,

How to monitor the GDI objects consumed by an application, reported from the Windows task manager :-)

If there is a GDI objects handles leaking, that amount will keep increasing


Is this the type of memory problem they are reporting? Is this a GDI problem or some other kind of problem?

Thanks,
Randal
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Last FWH version. Memory leak.
Posted: Tue Feb 12, 2013 09:41 PM

The problem is related with bitmaps, so it should be a GDI objects handles leaking issue

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Last FWH version. Memory leak.
Posted: Wed Feb 13, 2013 10:02 PM

I have the feeling that the disappearing bitmaps are just a symptom of a memory leak elsewhere. As I suggested earlier, I think this could be proven by creating an app with a toolbar, then running a loop that creates something like a font and doesn't destroy it. You might also have to re-display the toolbar occasionally to see the effect.

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Last FWH version. Memory leak.
Posted: Wed Feb 13, 2013 10:17 PM
I re-read the earlier posts in this thread and I think this may be the problem.

I had also problem with memory leaks. For me they disappeared after I disabled

CODE: SELECT ALL EXPAND VIEW
::SetFont( ::oFont )


at METHOD Initiate of CLASS TComboBox. In older version of FWH this line wasn't there.
Best Regards,
Ruediger Alich


I don't have the 12.12 version of FWH so I can't look at the source, but there may be a font getting created and not destroyed.

Regards,
James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 284
Joined: Mon Oct 24, 2005 08:04 PM
Re: Last FWH version. Memory leak.
Posted: Thu Feb 14, 2013 02:27 PM

Wouldn't they be able to identify the problem as a font not being released or a gdi problem using checkres, if that were the problem?

Randal

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Last FWH version. Memory leak.
Posted: Thu Feb 14, 2013 02:39 PM
Wouldn't they be able to identify the problem as a font not being released or a gdi problem using checkres, if that were the problem? -Randal


I would think so.

Regards,
James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Last FWH version. Memory leak.
Posted: Thu Feb 14, 2013 03:49 PM
I notice there is a similar discussion of vanishing bitmaps on toolbars back in Nov 2012 here:

http://forums.fivetechsupport.com/viewtopic.php?f=3&t=24329

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
Re: Last FWH version. Memory leak.
Posted: Thu Feb 14, 2013 04:25 PM

Yes, in my opinion it is connected with Transbmp function.

Or maybe there is a leak in Fivewin´s internals, I don´t know.

Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.