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

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


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

2 posts / 0 new

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

Leave a Comment

Please sign in to add a comment. Not a member? Join today