diff include/poddlthread.h include/poddlthread.h --- include/poddlthread.h +++ include/poddlthread.h @@ -7,6 +7,7 @@ #include #include +#include #include @@ -24,7 +25,7 @@ class poddlthread { private: void mkdir_p(const char * file); download * dl; - std::ofstream *f; + std::shared_ptr f; timeval tv1; timeval tv2; size_t bytecount; diff --git a/src/poddlthread.cpp b/src/poddlthread.cpp --- src/poddlthread.cpp +++ src/poddlthread.cpp @@ -22,7 +22,6 @@ poddlthread::poddlthread(download * dl_, newsbeuter::configcontainer * c) : dl(d } poddlthread::~poddlthread() { - delete f; } void poddlthread::operator()() {