We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9cec764 commit bd662bcCopy full SHA for bd662bc
1 file changed
src/SIL.LCModel.Utils/ArrayPtr.cs
@@ -149,8 +149,9 @@ public void Dispose()
149
/// ------------------------------------------------------------------------------------
150
protected virtual void Dispose(bool disposing)
151
{
152
- // Only warn for finalized instances that actually own allocated memory.
153
- Debug.WriteLineIf(!disposing && m_ownMemory,
+ // Only warn for finalized instances that own an unmanaged buffer that was
+ // actually allocated by this ArrayPtr.
154
+ Debug.WriteLineIf(!disposing && m_ownMemory && m_ptr != IntPtr.Zero,
155
"****** Missing Dispose() call for " + GetType().Name + ". ****** ");
156
157
// Must not be run more than once.
0 commit comments