Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dispose objects where possible #1210

Merged
merged 2 commits into from
Oct 19, 2023
Merged

Dispose objects where possible #1210

merged 2 commits into from
Oct 19, 2023

Conversation

xPaw
Copy link
Member

@xPaw xPaw commented Mar 28, 2023

One big object is MsgBase which holds a memory stream and binary readers, but making that disposable requires a bit of a refactor.

@@ -112,7 +111,9 @@ public IDisposable Subscribe<TCallback>( JobID jobID, Action<TCallback> callback
throw new ArgumentNullException( nameof(callbackFunc) );
}

#pragma warning disable CA2000 // Not implicitly disposed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect this is warning because the Subscription constructor could throw, and this remains undisposed.

@xPaw xPaw merged commit a371559 into master Oct 19, 2023
@xPaw xPaw deleted the xpaw/dispose branch October 19, 2023 07:47
@xPaw xPaw added this to the 2.5.0 milestone Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants