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
The IMeterFactory interface offers the Create method for generating a Meter instance. We supply the default implementation of the meter factory, which utilizes this method to create meters. However, an issue arises as Meters are disposable objects, and we assert that the factory should be responsible for managing the lifetime of the meters it creates. Users who employ the factory to generate meters may mistakenly consider it to be disposable and attempt to dispose of it. We are currently tracking this issue to determine the most appropriate resolution.
Here are a couple of suggestions to address the issue:
Modify the returned meters' disposal behavior to be a no-op, ensuring that no adverse effects occur even if users attempt to dispose of them.
Rename the Create method to something like Get to convey to users that the returned objects should not be disposed.
Consider implementing one or both of these ideas to mitigate the problem and provide clearer guidance to users.
The text was updated successfully, but these errors were encountered:
The
IMeterFactory
interface offers the Create method for generating a Meter instance. We supply the default implementation of the meter factory, which utilizes this method to create meters. However, an issue arises as Meters are disposable objects, and we assert that the factory should be responsible for managing the lifetime of the meters it creates. Users who employ the factory to generate meters may mistakenly consider it to be disposable and attempt to dispose of it. We are currently tracking this issue to determine the most appropriate resolution.Here are a couple of suggestions to address the issue:
Consider implementing one or both of these ideas to mitigate the problem and provide clearer guidance to users.
The text was updated successfully, but these errors were encountered: