CmIDestroyable.cpp 355 B

12345678910111213141516171819202122
  1. #include "CmIDestroyable.h"
  2. #include "CmDebug.h"
  3. namespace CamelotEngine
  4. {
  5. IDestroyable::IDestroyable()
  6. :mDestroyed(false)
  7. { }
  8. IDestroyable::~IDestroyable()
  9. {
  10. if(!mDestroyed)
  11. {
  12. LOGWRN("Destructor called but object is not destroyed. Object will leak.")
  13. }
  14. }
  15. void IDestroyable::destroy()
  16. {
  17. mDestroyed = true;
  18. }
  19. }