Memory leak

Topics related to the Krypton Toolkit.

Moderators: Phil Wright, Chris Porter

Memory leak

Postby Carl » Fri May 27, 2011 10:38 pm

Hi,

I am currently debugging an application that uses Krypton Toolkit, and it's got a lot of memory leak problems. When I investigate it with .NET memory profiler it shows me a lot of classes like ViewManager, ViewLayoutCenter, etc. (around 12 classes from Krypton Toolkit) that got an increasing number of instances (it goes up to 800 instances of each after like 2 minutes of opening and closing forms). My problem is that I don't see any of my own classes in the Root Path of those instances (the reason why they are kept alive, the places where they are still referenced when they shouldn't be).


I just posted this question on StackOverflow (see http://stackoverflow.com/questions/6151 ... eak-issues for more details) and someone told me to post my question here.

Any help would be greatly appreciated,

Thanks!
Carl
 
Posts: 2
Joined: Fri May 27, 2011 10:26 pm

Re: Memory leak

Postby Carl » Sat May 28, 2011 1:44 am

My question was answered on StackOverflow so no need to reply. I found the problem in my code.
Carl
 
Posts: 2
Joined: Fri May 27, 2011 10:26 pm

Re: Memory leak

Postby Edgar Ferreira » Fri Jul 08, 2011 4:40 am

Hi!
I've been noticing and trying to improve the resources consuption of my applications that use Krypton, but it seems to me that there is some lack on Krypton controls when we dispose them.

I'm using ANTS Memory Profiler and it shows me a lot of controls still in memory even after I dispose them. Going throw the profiler results, it shows that some Krypton controls (contained by disposed UserControls and Forms) are hanging on events like:
- KryptonManager.GlobalPaletteChanged
- PaletteBase.BaseRendererChanged

I found many of these pending references on controls such as:
- KryptonButton
- KryptonCheckButton
- KryptonWrapLabel
- KryptonGroup
- KryptonNavigator

Does anyone know if there is some tip or aditional instruction to add when disposing Krypton controls?
Edgar Ferreira
 
Posts: 132
Joined: Thu Mar 26, 2009 8:59 pm
Location: Coimbra, Portugal

Re: Memory leak

Postby Skalli » Fri Jul 08, 2011 5:16 pm

It kinda looks similar to the problem I've noticed with user objects: http://www.componentfactory.com/forums/viewtopic.php?f=6&t=3636.
I'm interested in how to solve this problem too. Or if I've done something wrong.
Skalli
 
Posts: 7
Joined: Fri Jul 01, 2011 6:28 pm

Re: Memory leak

Postby Edgar Ferreira » Fri Jul 08, 2011 6:47 pm

Skalli wrote:It kinda looks similar to the problem I've noticed with user objects: http://www.componentfactory.com/forums/viewtopic.php?f=6&t=3636.
I'm interested in how to solve this problem too. Or if I've done something wrong.


Hi!
In fact my application is similar to yours. I load a bunch of plugins to a KryptonWorkspace and when I close and dispose them, the User Objects count doesn't reduce as expected.
I'm still investigating it...
Edgar Ferreira
 
Posts: 132
Joined: Thu Mar 26, 2009 8:59 pm
Location: Coimbra, Portugal

Re: Memory leak

Postby Phil Wright » Mon Jul 11, 2011 8:51 pm

A sample that is as simple as possible is the best way for me to investigate any issues you have found. Thanks.
Phil Wright
Site Admin
 
Posts: 2720
Joined: Thu Apr 13, 2006 2:55 pm
Location: Melbourne, Australia


Return to Krypton Toolkit

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron