Fix memory leaks for JpegXLDecoder#26787
Conversation
@MaximSmolskiy I have tested it under Windows using MSVC and there should be no memory leak anymore. But I just did a very basic test, I executed the imread function 100 times to read the jxl file, and the memory usage gradually went up to 659M before this PR, and after this PR, the memory usage was only 5M. |
|
i confirm the test pass on windows frankly i did not understand what is the difference calling |
As I understand it, When |
|
I think I understand, probably |
|
Yes. The first element of When |
Pull Request Readiness Checklist
Fix #26766
It should additionally fix issue itself (problem with
removeonWindows), but I can't be completely sure - I can't test this onWindowsSee details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.