Skip to content

Memory Leak with some functions #104

Description

@0rbianta

While I was looping through frames of VideoCapture I executed this method to show frames on JavaFX image view:
private Image mat2Image(Mat frame) {
MatOfByte buffer = new MatOfByte();
Imgcodecs.imencode(".png", frame, buffer);
return new Image(new ByteArrayInputStream(buffer.toArray()));
}

for some reason it caused memory leak very rapidly like 5mb/s. After that I switch to opencv library from their official website and same code worked fine without any leaks.

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