Skip to content

Memory leak #102

Closed
Closed
@cike111

Description

@cike111

Describe the bug
In iOS, if you call grayMat.set(y, x, grayLevel) every 2 seconds, it will cause the memory to continuously increase

To Reproduce
17186112505115

pubspec.yaml code:

dependencies:
  flutter:
    sdk: flutter

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.6
  opencv_dart: ^1.0.9

mian.dart

 void initState() {
    super.initState();
    _timer = Timer.periodic(Duration(milliseconds: 2000), (timer) {
      test();
    });
  }
test(){
  CV.Mat grayMat = CV.Mat.zeros(
     1000, 1000, CV.MatType.CV_8UC1);
  int maxY = grayMat.rows - 1;
  int maxX = grayMat.cols;
  for (int y = maxY; y >= 0; y--) {
    for (int x = 0; x < maxX; x++) {
      grayMat.set<int>(0, 0, 30);
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions