OpenCV static library does not delete TLS storage (Bugfix #2499)


Added by Sergey Popov over 4 years ago. Updated almost 4 years ago.


Status:Open Start date:2012-11-02
Priority:Normal Due date:
Assignee:Alexander Smorkalov % Done:

0%

Category:core
Target version:Next Hackathon
Affected version:branch '2.4' Operating System:
Difficulty: HW Platform:
Pull request:https://github.com/Itseez/opencv/pull/1006

Description

The possible solution is to create a small dll for windows static build that exports TLS keys and calls cv::deleteThreadAllocData() and cv::deleteThreadRNGData() in DllMain().


OpenCV_TLS_Patch.zip (2.1 kB) Sergey Popov, 2012-12-04 08:21 am


History

Updated by Andrey Kamaev over 4 years ago

I confirm the issue. Static build makes impossible to clear thread-private data. As a side effect this results in memory leak in python/java wrappers (official python packages from sourceforge are also affected).

However the suggested solution doesn't look acceptable.

  • Assignee set to Vadim Pisarevsky
  • Category set to core

Updated by Sergey Popov over 4 years ago

Hello,
I created the patch that fixes the problem without an additional dll. The issue #2538 is also fixed in the patch. I hope it will be useful.

Updated by Anna Kogan over 4 years ago

Hello Sergey,

Thank you for the patch! Could you please make a pull request for it: http://opencv.org/opencv-pull-requests-test-results.html ? It would be very appreciated!

Updated by Kirill Kornyakov about 4 years ago

Sergey, did you have a chance to work on a pull request?

  • Affected version set to branch '2.4'
  • Target version set to Next Hackathon
  • Tracker changed from Bug to Bugfix
  • Description changed from The possible solution is to create a small dll for windows static build that ... to The possible solution is to create a small dll for windows static build that ... More

Updated by Alexander Smorkalov almost 4 years ago

  • Assignee changed from Vadim Pisarevsky to Alexander Smorkalov

Updated by Alexander Smorkalov almost 4 years ago

  • Pull request set to https://github.com/Itseez/opencv/pull/1006

Also available in: Atom PDF