A Few Free Fixes…

Here are just a few examples of the many leak fixes the MemClean! team has discovered.

General MS Common Control Fix

The MemClean! team has found that the Forms cleaning agent works wonders against leaks in the
common controls provided by .NET.

By and large the MS common control set is very stable. There are, however, a few specific scenarios
where they leak. One such situation, highlighted in the MemClean! SomeLeakyThing example, deals
with the System.Windows.Forms.ToolStrip control. There is a specific, though common, leak
scenario when a System.Windows.Forms.ToolStripComboBox has been added to the tool strip
and the SelectedIndexChanged event has been subscribed to.

The specific details of the leak are beyond the scope of this discussion. Let’s just say that every UI
control framework employs the same problematic pattern described in the .NET can Leak Managed Memory? More…
section. Somewhere deep in the .NET control hierarchy live multiple static events.

FarPoint

FarPoint makes a great suite of .NET UI controls. They are robust and feature rich. There are, however,
certain specific scenarios where they leak. Can you guess how? Anyway, here’s a fix for one such
specific scenario involving their FarPoint.Win.Spead set of controls:

MemClean.Products.Clean("FarPoint", "b0")

Notice the strange type name, b0. No FarPoint hasn’t thrown the coding standard guidelines out the
window, the assembly is obfuscated. What’s interesting is that MemClean! still works just fine on an
obfuscated assembly.

Infragistics

Everyone knows these boys make great controls and they know what they’re doing. Remember what
was said earlier concerning the problematic pattern? Discipline and Time. Anyway, here’s a fix for a
very common Infragistics control leak.

If you dig into this particular one on the net, you’ll discover numerous solutions to this particular
problem, all of which are very specific to either an Infragistics version or in their implementation. The
MemClean! framework avoids these traps by employing a more generalized approach to leak
resolution.

MemClean.Products.Clean("Infragistics", "AccessibleTextManager", "StyleManager", "Office2007ColorTable", "XPThemes")

Send us your fixes!

If you find new 3rd party fixes resolved by employing MemClean! cleaning agents, please share them
with us. We will share them with the world.

Happy Hunting...

Last edited Oct 8, 2009 at 4:11 AM by theMont, version 2

Comments

No comments yet.