C++ Logger: Fixed bug when deleting logger.