Memory leak in OpenCV 4.20

that is a very old release.

if you found an issue in 4.2.0, it could have been fixed since then.

please update to latest release and try again.

“leaks” of small or bounded size are not practically considered leaks. you’ve got a case if you can cause arbitrary amounts of leakage (and gigabytes at least).