1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

Merge branch 4.x

This commit is contained in:
Alexander Smorkalov
2025-08-13 10:39:05 +03:00
42 changed files with 1557 additions and 872 deletions
+13
View File
@@ -397,3 +397,16 @@ Module['matFromImageData'] = function(imageData) {
mat.data.set(imageData.data);
return mat;
};
// Add Symbol.dispose support for using declaration in TypeScript 5.2+ and future JS
if (
typeof Symbol !== "undefined" &&
Symbol.dispose &&
typeof cv !== "undefined" &&
cv.Mat &&
typeof cv.Mat.prototype.delete === "function"
) {
cv.Mat.prototype[Symbol.dispose] = cv.Mat.prototype.delete;
// Optionally repeat for other types that require manual cleanup:
if (cv.UMat) cv.UMat.prototype[Symbol.dispose] = cv.UMat.prototype.delete;
// Add more as OpenCV gains new manual-cleanup classes
}