diff --git a/src/DownloadEngine.h b/src/DownloadEngine.h index dad7773a..eb827b97 100644 --- a/src/DownloadEngine.h +++ b/src/DownloadEngine.h @@ -131,8 +131,6 @@ private: int64_t refreshInterval_; Timer lastRefresh_; - std::deque> routineCommands_; - std::unique_ptr cookieStorage_; #ifdef ENABLE_BITTORRENT @@ -167,11 +165,14 @@ private: std::multimap::iterator findSocketPoolEntry(const std::string& key); - std::deque> commands_; std::unique_ptr requestGroupMan_; std::unique_ptr fileAllocationMan_; std::unique_ptr checkIntegrityMan_; Option* option_; + // Ensure that Commands are cleaned up before requestGroupMan_ is + // deleted. + std::deque> routineCommands_; + std::deque> commands_; public: DownloadEngine(std::unique_ptr eventPoll);