Closed Therzok closed 7 years ago
That'd make sense. We don't actually use SafeHandles correctly so it doesn't make a whole lot of sense.
However, to go back to my original "should we make this private" question about th safehandle class - if we make these implementation details public we'll never be able to change them again. A normal finalizable object makes sense, but I think we should make it a non-public class ;)
I have an idea of how to make it non-public and I will implement it.
Wanna squash and merge it?
Should I use a simple object instead of a safehandle and implement finalizer/dispose? The current approach makes dispose queue on a timeout too. We'd also save a few bytes per object by just wrapping an IntPtr and not the additional safehandle states.