core(TLS): implement releasing of ThreadData with thread termination#15692
Conversation
- move TLS & instrumentation code out of core/utility.hpp - (*) TLSData lost .gather() method (to dispose thread data on thread termination) - use TLSDataAccumulator for reliable collecting of thread data - prefer using of .detachData() + .cleanupDetachedData() instead of .gather() method (*) API is broken: replace TLSData => TLSDataAccumulator if gather required (objects disposal on threads termination is not available in accumulator mode)
|
Hi @alalek, I'm having OpenCV memory leak issues reported by heaptrack on Linux, I saw your pr is merging into version 3.4, I'm wondering if 4.x also has the same problem? Will you merge this into 4.x as well? |
|
@alalek any plan to merge this into 4.x? |
|
@CodArs-van , it have been merged to master. |
|
Hi @alalek .First of all, I am very grateful for the repair of the opencv async memory leak. This has also been verified after the update of the opencv version(such as 4.2), but now another problem encountered is somewhat similar. The same version(opencv 4.2) is also frequently used async (or std::thread)to open threads, in the child thread Calling opencv interfaces such as canny(or remap), there is a problem of continuous memory growth, do you know why? |
Merge with contrib: opencv/opencv_contrib#2316
resolves #9745
TODO: