Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Jugger

Pages: [1]
1
System / Re: sf::ThreadLocalPtr destruction
« on: February 03, 2013, 02:06:28 pm »
Thanks for the reply, but using thread_local won't work for me, because my compiler doesn't support it yet. I also like to keep my code portable so I try not to rely on C++11 features too much yet.

I tried using boost::thread_specific_ptr and it does exactly what I want, but I'd prefer using SFML implementation of thread local storage if possible to minimize dependencies.

2
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?

Pages: [1]