Skip to content

LISTING 2-65 The dispose pattern #7

@FlavioRodr

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.

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