mirror of
https://github.com/SFML/SFML.git
synced 2025-02-18 06:18:01 +08:00
Added protected d-tor to sf::NonCopyable to prevent possible resource leaks.
This commit is contained in:
parent
67ef694443
commit
77d19859bc
@ -51,6 +51,16 @@ protected:
|
|||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
NonCopyable() {}
|
NonCopyable() {}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////
|
||||||
|
/// \brief Default destructor
|
||||||
|
///
|
||||||
|
/// By declaring a protected destructor it's impossible to
|
||||||
|
/// call delete on a pointer of sf::NonCopyable, thus
|
||||||
|
/// preventing possible resource leaks.
|
||||||
|
///
|
||||||
|
////////////////////////////////////////////////////////////
|
||||||
|
~NonCopyable() {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user