You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a factory class which creates IDisposables. I expect to see a warning when using the factory without disposing it's result.
However, ther is no warning.
Is there anything I can do to make a warning appear?
Here's a simplified code snippet:
publicinterfaceIDisposableFactory{IDisposableCreate();}publicclassExample{voidExample(IDisposableFactoryfactory){IDisposabledisposable=factory.Create();// why no warning?}}
The text was updated successfully, but these errors were encountered:
I have a factory class which creates
IDisposable
s. I expect to see a warning when using the factory without disposing it's result.However, ther is no warning.
Is there anything I can do to make a warning appear?
Here's a simplified code snippet:
The text was updated successfully, but these errors were encountered: