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
If event handles are returned from methods, it's easy to forget to dispose of them in cases where the event isn't required. Consider returning them via out parameters instead, so they are not allocated unless they are actually going to be used.
Another alternative is creating two methods for each of the current ones, one which returns void and another which performs the same operation but returns an event handle.
The text was updated successfully, but these errors were encountered:
If event handles are returned from methods, it's easy to forget to dispose of them in cases where the event isn't required. Consider returning them via
out
parameters instead, so they are not allocated unless they are actually going to be used.Another alternative is creating two methods for each of the current ones, one which returns
void
and another which performs the same operation but returns an event handle.The text was updated successfully, but these errors were encountered: