Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.

concurrent_unordered_map: emplace does not call destructor on arguments on insertion failure

Alexander_F_2
Beginner
667 Views

Hi,

when updating to TBB 2019 Update 8 we observed a memory leak.

We use concurrent_unordered_map.emplace in our source code. When the insertion fails, the argument's destructor is not called.

When we change from emplace to concurrent_unordered_map.insert the argument's destructor is called as expected.

The problematic code seems to be the AllowDestroy argument to internal_insert.

 

We are using the pre-build win packages from https://github.com/intel/tbb/releases, Windows 10, MS VS 2017 with the most recent compiler and C++17 as the language standard, 64 Bit.

Best,

Alexander

0 Kudos
1 Reply
Ivan_K_Intel1
Employee
667 Views

Hi Alexander,

Thank you for the investigation and reporting the issue. This issue will be fixed in one of the next TBB releases.

Regards,

Ivan

0 Kudos
Reply