cginternals / globjects

C++ library strictly wrapping OpenGL objects.
https://globjects.org
MIT License
539 stars 59 forks source link

Evaluate use of std::enable_shared_from_this instead of ref_ptr #319

Closed scheibel closed 7 years ago

scheibel commented 7 years ago

It seems like std::enable_shared_from_this introduces a concept to std::shared_ptr that makes it similar in usage to the globjects::ref_ptr (http://en.cppreference.com/w/cpp/memory/enable_shared_from_this). I suggest we should evaluate this and switch implementations.

scheibel commented 7 years ago

We decided to put the user of globjects in charge of managing shareable objects. Only objects with exclusive ownership are maintained by globjects. This behavior is integrated in the current master and breaks the compatibility to our latest release (1.1.0).