Skip to content

Memory Leak Issue with CvtColor BGR2RGBA #1774

Open
@llopen

Description

@llopen

Problem Description:
The current implementation has potential memory leak issues when performing color space conversion from BGR to RGBA using CvtColor,

//1. This way of writing will cause memory leaks。Although mat.Dispose() is called, the memory is not released
Mat ct = mat.CvtColor(ColorConversionCodes.BGR2RGBA); // Convert channel order
mat.Dispose();
mat = ct;
//2. This way of writing does not leak
Cv2.CvtColor(mat, mat, ColorConversionCodes.RGB2RGBA);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions