Skip to content

ISB001 misfires on proxy fields that *are* disposed #214

Description

@AArnott
        private ITerminalService terminalService;

        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);
            foreach (var token in profferTokens)
                token?.Dispose();

            this.serviceBrokerClient?.Dispose();
            (this.terminalService as IDisposable)?.Dispose();
        }

The field is disposed, but the analyzer still emits this:
error ISB001: The proxy stored in "LinuxConnectionManagerPackage.terminalService" must be disposed by an IDisposable.Dispose or Dispose(bool) method on the "LinuxConnectionManagerPackage" type.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions