diff --git a/include/libtorrent/aux_/session_impl.hpp b/include/libtorrent/aux_/session_impl.hpp index a999fd67f..c02b7ae9d 100644 --- a/include/libtorrent/aux_/session_impl.hpp +++ b/include/libtorrent/aux_/session_impl.hpp @@ -184,6 +184,12 @@ namespace libtorrent struct TORRENT_EXPORT session_impl: boost::noncopyable, initialize_timer , boost::enable_shared_from_this { +#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING + // this needs to be destructed last, since other components may log + // things as they are being destructed. That's why it's declared at + // the top of session_impl + boost::shared_ptr m_logger; +#endif // the size of each allocation that is chained in the send buffer enum { send_buffer_size = 128 }; @@ -1033,8 +1039,6 @@ namespace libtorrent std::list > m_tracker_loggers; std::string m_logpath; - public: - boost::shared_ptr m_logger; private: