Memory leak ribbonwindow loading/unloading (not solved!)

Ribbon for WPF Forum

Posted 7 years ago by Arthur Damen
Version: 12.1.0560
Platform: Silverlight Controls
Environment: Windows 7 (64-bit)

2 weeks ago i found a memory leak inside the ribbonwindow.
In the older thread there would be a bugfix for this for the new 2012.1.560 version.

I downloaded it and tested. but the problem is still there, nothing has been solved.
This is very disappointing since this is a major problem for us!

Original bug:

in my case the user has a main wpf application and opens a second window that is a ribbonwindow. This window is opened/closed repeatedly. Each time the window is opened about 15-20MB is used, and NOT freed after close of the window.

Please solve this ASAP because this eventually crashes our application.


-To get this reproduced i openend the actipro example browser (exe).

-next choose ribbonbar

-select demos/document editor (like word)

-now open the task manager and select the actipro program and write down the memory usage

-in the actipro sample browser hit the "Run external sample"

you will notice an increasement in memory (this is of course normal)

-next close the external sample window.

you will notice that the memory is not released!

-repeatedly open/close this sample window will increase the memory

Comments (3)

Answer - Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Arthur,

For reference, here is the original related thread.

You cannot use task manager to look for memory leaks because it doesn't accurately track .NET objects and how garbage collection works.  You must use a memory profiler application like the one at 

When we previously tested the ribbon demo using a real memory profiler per your previous thread, we did find a couple areas that needed work because RibbonWindows could accumulate and we fixed those things in 2012.1.  I just tested it again by opening and closing the demo once to get any static data in place, then taking a snapshot.  Then I opened it again and took another snapshot and repeated several more times.  I don't see any additional RibbonWindow instances accumulating, and actually no additional Actipro classes at all accumulating.

So based on that, I don't believe there is a leak any longer.  If you think there is, please make a new simple sample project that will repro it.  Then use a real memory profiler to test if Actipro objects are accumulating between RibbonWindow displays.  If you find a leak, e-mail the project to us so we can test it as well.  Please rename the .zip file extension so it doesn't get spam blocked.

Actipro Software Support

Posted 7 years ago by Arthur Damen

I repeatedly opened/close the word editor. At start the samplebrowser application uses 100Mb (i use the resource monitor)

after that is start opening/closing the word editor.

It levels out at 370Mb.

It would be nice if your guys can write 'clean' code that does not leave to much memory traces behind...
This is the way we program.
This kind of mechanisms where memory increases is a real problem because we have watcher that check your memory level to find leaks during runtime. If everybody does not clean up their unused memory, we are almost unable to detect leaks.

Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA

Well again, you cannot use task manager to look for memory leaks.  You need to use a real .NET memory profiler application that tells you live objects, etc.  Please read any number of articles on the web that talks about .NET memory management like this:

Basically .NET reserves allocated memory and doesn't always release it, even after garbage collection runs.  If your system starts to run out of memory, it will release some of that unused memory.  This is exactly why you cannot use task manager to look for leaks, since .NET won't give that memory back immediately and from your point of view, you see memory allocation rising.  Even though in reality, there may be no memory leak and allocated .NET objects aren't rising.

If you have a proper .NET memory profiler app, you can look and see if instances of your window are still being retained in memory after an open/close.  That is where you want to start if you think there is still a problem.  I'd highly recommend you try that on your app.

Actipro Software Support

The latest build of this product (v2018.1 build 0675) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.