Skip to content

LISTING 2-65 The dispose pattern #7

Description

@FlavioRodr

Is this example right? The documentation is slightly different:
https://docs.microsoft.com/en-us/dotnet/standard/garbage-collection/implementing-dispose

One of the methods signature is different:
protected override void Dispose(bool disposing)
not
public virtual void Dispose(bool disposing)

and at the end of this method the disposed field is set to true.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions