#1017 Add a finalizer SmartSubtransportRegistration - #1220
Conversation
|
Ignore that last comment - I thought this was |
|
Just curious - from the comments in #1017, it looks like the direction was to not make the registration disposable? |
|
Need to work on my reading comprehension. Looks like the direction was to add a finalizer, and not make the object disposable. Is there a downside to also making it disposable and have the finalizer call dispose? If the object is not made disposable then we no longer have control over when things are cleaned up and must wait for the finalizer. If more tests are added then they must ensure there are no naming collisions, which makes things a bit awkward in my opinion. Will be happy to remove the dispose pieces though if that is the consensus. Speaking of tests...looks like I've broken everything. |
|
Another approach would be to mimic what's has been done for
See this unit test that asserts this feature. |
SmartSubtransportRegistration -Updated tests to now call dispose -Removed CannotUnregisterTwice test, as this test is no longer applicable after implementing dispose pattern.
-Implement IDisposable and added finalizer to
SmartSubtransportRegistration
-Updated tests to now call dispose
-Removed CannotUnregisterTwice test, as this test is no longer
applicable after implementing dispose pattern.