[OpenTK] Removed the finalizer in OpenTK.Toolkit

This resolves crashes related to the platform factory being reset while
resources are still live.
This commit is contained in:
thefiddler 2014-07-23 21:22:22 +02:00
parent 8b1be5c49a
commit 8f30f77b30

View file

@ -178,22 +178,19 @@ namespace OpenTK
} }
} }
} }
else
{
Debug.Print("OpenTK.Toolkit leaked, did you forget to call Dispose()?");
platform_factory = null;
toolkit = null;
initialized = false;
}
} }
#if DEBUG
/// <summary> /// <summary>
/// Finalizes this instance. /// Finalizes this instance.
/// </summary> /// </summary>
~Toolkit() ~Toolkit()
{ {
Dispose(false); Debug.Print("[Warning] {0} leaked, did you forget to call Dispose()?");
// We may not Dispose() the toolkit from the finalizer thread,
// as that will crash on many operating systems.
} }
#endif
#endregion #endregion
} }