Closed fdncred closed 5 years ago
im not happy with this iDisposable method because there are a few parts i simply dont like and need. I dont like tracing and raiseevents on dispose. The IsDisposed Boolean is also not needed because the IntPtr is set to null in this case and you can see it this way.
The point here was to write a proper disposable class to derive from that follows the Dispose pattern. There is a pattern for a reason. https://docs.microsoft.com/en-us/dotnet/standard/garbage-collection/implementing-dispose
The current implementation of Dispose does not follow the Disposable pattern. Using something like this and deriving all disposable classes from it would be better.