-
Notifications
You must be signed in to change notification settings - Fork 10
Description
Is your feature request related to a problem? Please describe.
There is no way to explicit Dispose the Segment.Analytics.Analytics client as it's not implements the IDisposable interface.
Describe the solution you'd like
Properly implement the IDisposable pattern, carefully watching for possible open semaphores (avoiding past mistakes)
https://learn.microsoft.com/en-us/dotnet/standard/garbage-collection/implementing-dispose
Describe alternatives you've considered
I dont have alternatives as I dont know how it's possible to "throw away" a Segment.Analytics.Analytics client.
Additional context
We decided to move away from the old package (https://github.com/segmentio/Analytics.NET) as it's Dispose method is still buggy (the used semaphore is discarded in case a http post is still on the fly, which makes it crash like hell if the timing is right).
During the migration we noticed that the old package implemented the IDisposable interface which we used, the new one doesn't.