How to interprete private bytes and memory leaks in a Progress/.Net application
I have a question regarding memory leaks in our application.
First of all, it's a Progress ABL Application. Progress has added .NET support a couple of years ago, so it's really hard to know where memory leaks are coming from.
Progress is written in C, so you have an ABL layer, a unmanaged C layer and then .NET. And on top of that we are using Infragistics which is known to have a poor design (with memory leaks).
In Progress ABL we can track memory leaks by parsing log files. For the .NET side we use Ants Memory Profiler.
Now, we have gotten some memory leak bug fixes from Progress which help a lot in lowering the number of leaking objects.
Before the Progress bug fixes this was a list of leaking instances between two snapshots (Between the two snapshots I opened and closed 10 Custom Forms):
This is a list of leaking objects after Progress gave us a hotfix.
As you can see, the Progress Fixes solved some of the leaking objects. Leaking objects seem to have gone down with a factor 10 for the same test. However, if I look at the private bytes, before the Progress fix private bytes went up with 13.1 Mb. After the fix private bytes went up with 5.1 Mb. So not 10 times better as the objects.
- After the fixes from Progress, there are still lots of objects staying alive. Is this normal? Shouldn't the Instance diff be zero for all objects? I can imagine that in a pure .NET Windows Forms application there might be some objects leaking, but not so many...
- If the objects go down with a factor 10, shouldn't private bytes also go down with a factor 10? And if not, what is consuming the 5.1 Mb private bytes? If I look at the Size diff (bytes) in Ants, I can't explain 5.1 Mb...
- Is there a way to profile memory leaks of unmanaged C applications?
Edit: OpenEdge Version 11.7.2 With a Hotfix solving three memory leak issues.