ObjectTK
ObjectTK copied to clipboard
GLResource.cs has unnecessary `GC.KeepAlive(this)` call.
this cannot be disposed during execution of one of its methods. Dispose is an instance member. Call is unnecessary and will just slightly hurt perf
These articles say something different:
- https://devblogs.microsoft.com/oldnewthing/20100813-00/?p=13153
- https://blogs.msdn.microsoft.com/oldnewthing/20100810-00/?p=13193/
An object can become eligible for collection during execution of a method on that very object.
Yes, it is useful in a finalizer. But this is in Dispose, where it is useless
Put it in the actual finalizer, not the top level Dispose method