Memory leak

Oct 31, 2012 at 12:55 PM
Edited Oct 31, 2012 at 12:56 PM

Ok, i hosted the control in winform, but i have a serious memory leak, with it. Every form closing and recreating increases the memory usage with 5000K. I removed the elementhost, and after that leak stopped so I'm sure the problem is in the elementhost, or the wpf usercontrol. So what can i do for stopping the memory leak?

Thanks: Peter

Coordinator
Oct 31, 2012 at 9:23 PM

Hi Peter,

There's nothing specific about the control that I can think of where memory is leaked.  The best recommendation I can make is to use a memory profiler to figure out what is holding on to the object instances - typically event handlers.

If you find an issue in the control itself I'd be happy to fix it!

Mike

Feb 21, 2013 at 12:18 AM
michaelnoonan

speti is totally right, there is really huge leak,
first of all, ofcourse thanks for this project and for sharing with us,
im using this project in commercial app,
this app have to be run 24/h so any memory leaks are totally unnacceptable,
i have been working a little with memory profiler to figure out whats goin on and i found where memory is leaking,
in your autohidebehavior class you are using dispatcher timer and you never shut down this dispatcher, so autobehavior class still keepeing pointer to entire floatingtouchscreenkeyboard,

ofcourse i figure out how to solve this problem and im shutting down dispatcher timers (each floatingkeyb class keeps two autobehavior classes) and in memory left only static values which is totally allright, and no more memory leaking
if anyone is interested i can prepare patch for this project
thanks
Mar 15, 2013 at 1:12 AM
brt wrote:
michaelnoonan

speti is totally right, there is really huge leak,
first of all, ofcourse thanks for this project and for sharing with us,
im using this project in commercial app,
this app have to be run 24/h so any memory leaks are totally unnacceptable,
i have been working a little with memory profiler to figure out whats goin on and i found where memory is leaking,
in your autohidebehavior class you are using dispatcher timer and you never shut down this dispatcher, so autobehavior class still keepeing pointer to entire floatingtouchscreenkeyboard,

ofcourse i figure out how to solve this problem and im shutting down dispatcher timers (each floatingkeyb class keeps two autobehavior classes) and in memory left only static values which is totally allright, and no more memory leaking
if anyone is interested i can prepare patch for this project
thanks
A patch would be great. Thanks.