LaurentGomila/SFML — Issue #137: sf::Transformable should not have a public non-virtual destructor
Author: JoeDralliam
Created: 2011-12-19 13:17:55+00:00
State: open

Hello,
As sf::Transformable is used as a public base class in some Sfml classes, having its destructor public and non virtual may lead to bugs in deallocation.
I suggest replacing this last by a (still public) virtual destructor :
* if Transformable is used in a hierarchy of class, probably in conjunction with dynamic allocation, it would solve the problem
* otherwise, if used as a local or member variable, there wouldn't be any overhead, since it is not allocated on the heap.