Skip to content

Memory Leak in Example #1

@abeham

Description

@abeham

This return statement here creates a new Bitmap for every call. The bitmap is not disposed of. Disposing the graphics doesn't dispose the Bitmap. I suppose the _refBitmap should be used instead?

return Graphics.FromImage(new Bitmap(1, 1));

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