Last FWH version. Memory leak.

User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Last FWH version. Memory leak.

Post by Antonio Linares »

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

Code: Select all

::oGet:SetFont( ::oFont )


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

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

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

Antonio Linares
www.fivetechsoft.com
User avatar
IBTC
Posts: 103
Joined: Sat Oct 18, 2008 8:13 pm
Location: Stuttgart, Germany
Contact:

Re: Last FWH version. Memory leak.

Post by IBTC »

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, ::oGet: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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Last FWH version. Memory leak.

Post by Antonio Linares »

Ruediger,

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

Antonio Linares
www.fivetechsoft.com
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Last FWH version. Memory leak.

Post by James Bott »

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Last FWH version. Memory leak.

Post by Antonio Linares »

You can easily check if an application is experiencing GDI objects handles leaking from here:

Image

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Last FWH version. Memory leak.

Post by Antonio Linares »

Found :-)

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Last FWH version. Memory leak.

Post by James Bott »

Antonio,

Will you explain what exactly you found?

James
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Last FWH version. Memory leak.

Post by Antonio Linares »

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
Randal
Posts: 250
Joined: Mon Oct 24, 2005 8:04 pm

Re: Last FWH version. Memory leak.

Post by Randal »

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Last FWH version. Memory leak.

Post by Antonio Linares »

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

Antonio Linares
www.fivetechsoft.com
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Last FWH version. Memory leak.

Post by James Bott »

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
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Last FWH version. Memory leak.

Post by James Bott »

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
::oGet: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
Randal
Posts: 250
Joined: Mon Oct 24, 2005 8:04 pm

Re: Last FWH version. Memory leak.

Post by Randal »

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
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Last FWH version. Memory leak.

Post by James Bott »

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
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Last FWH version. Memory leak.

Post by James Bott »

I notice there is a similar discussion of vanishing bitmaps on toolbars back in Nov 2012 here:

http://forums.fivetechsupport.com/viewt ... =3&t=24329

James
Post Reply