Description
Describe the bug
In iOS, if you call grayMat.set(y, x, grayLevel) every 2 seconds, it will cause the memory to continuously increase
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);
}
}
}