1
System / sf::ThreadLocalPtr destruction
« on: February 03, 2013, 12:27:23 pm »
Hi there.
I was playing around with sf::ThreadLocalPtr and it appears that its destructor doesn't call destructors of the stored objects. This causes leaks when the sf::ThreadLocalPtr is destroyed. I was thinking about manually destroying all the objects stored in the sf::ThreadLocalPtr prior to its destruction, but I have no idea how to do something like that or whether it's actually possible.
Is there any way how to prevent these leaks or do I have to use boost::thread_specific_ptr for this functionality?
I was playing around with sf::ThreadLocalPtr and it appears that its destructor doesn't call destructors of the stored objects. This causes leaks when the sf::ThreadLocalPtr is destroyed. I was thinking about manually destroying all the objects stored in the sf::ThreadLocalPtr prior to its destruction, but I have no idea how to do something like that or whether it's actually possible.
Is there any way how to prevent these leaks or do I have to use boost::thread_specific_ptr for this functionality?