Continual buildup up Byte arrays during each run - most likely GDIobjects
LPeterson Posts: 7 New member
edited March 29, 2023 2:14PM in ANTS Memory Profiler
(I am trialing Ants Memory Profiler). During run-time, my Winform app launches several classes, each of which use GDI with graphics, bitmaps, rectangles, pens, and brushes. I went through each and made sure they (Pens, Brushes, bitmaps, Graphics, etc.) were disposed (.Dispose). The classes themselves are also finalized and disposed by default using GC.
However, it seems that for each successive run of the same classes there is a buildup of Byte arrays.
Below, you can see that the Byte arrays are likely to be GDIObjects that aren't getting disposed. Is there any way to do surgery on System.Drawing.Internal.GPStream and possibly kill some of the arrays? Is there something other than GDIObjects that would do this? FYI - come to think of it, I am not disposing rectangles, so would that cause this? Anything else that comes to mind?
0 · Share on Twitter
For transparency I must clarify that our support function doesn't extend to guided application debugging.