What unnamed GDI resources could I be leaking
<p>I ran an overnight stress test of my application, and when i came in this morning the software had crashed from a Windows error.</p>
<p>The error occurred because the process was obviously out of GDI handles:</p>
<p><strong>Process Explorer</strong></p>
<p><a href="https://i.stack.imgur.com/ieEfz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ieEfz.png" alt="enter image description here" /></a></p>
<p><strong>Task Manager</strong></p>
<p><a href="https://i.stack.imgur.com/W84Ja.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/W84Ja.png" alt="enter image description here" /></a></p>
<p>The next thing is to figure out exactly which kind of GDI resource (e.g. Pen, Brush, Bitmap, Font, Region, DC) i'm leaking. For that i turned to <a href="http://www.nirsoft.net/" rel="nofollow noreferrer">NirSoft</a>'s <a href="http://www.nirsoft.net/utils/gdi_handles.html" rel="nofollow noreferrer">GDIView</a>:</p>
<p><a href="https://i.stack.imgur.com/vLtNX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vLtNX.png" alt="enter image description here" /></a></p>
<ul>
<li><strong>Pen:</strong> 0</li>
<li><strong>Ext Pen</strong>: 0</li>
<li><strong>Brush</strong>: 4</li>
<li><strong>Bitmap</strong>: 35</li>
<li><strong>Font</strong>: 19</li>
<li><strong>Palette</strong>: 1</li>
<li><strong>Region</strong>: 3</li>
<li><strong>DC</strong>: 11</li>
<li><strong>Metafile DC</strong>: 0</li>
<li><strong>Enhanced Metafile DC</strong>: 0</li>
<li><strong>Other GDI</strong>: 0</li>
<li><strong>GDI Total</strong>: 0</li>
<li><strong>All GDI</strong>: <strong>10,000</strong></li>
</ul>
<p>What could a GDI handle be, one that is not any known GDI type?</p>