summaryrefslogtreecommitdiff
path: root/src/DownloadEngineFactory.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/DownloadEngineFactory.cc')
-rw-r--r--src/DownloadEngineFactory.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/DownloadEngineFactory.cc b/src/DownloadEngineFactory.cc
index 0227e061..49e9a4bf 100644
--- a/src/DownloadEngineFactory.cc
+++ b/src/DownloadEngineFactory.cc
@@ -148,11 +148,12 @@ DownloadEngineFactory::newDownloadEngine
}
std::shared_ptr<DownloadEngine> e(new DownloadEngine(eventPoll));
e->setOption(op);
-
- auto requestGroupMan = std::make_shared<RequestGroupMan>
- (std::move(requestGroups), MAX_CONCURRENT_DOWNLOADS, op);
- requestGroupMan->initWrDiskCache();
- e->setRequestGroupMan(requestGroupMan);
+ {
+ auto requestGroupMan = make_unique<RequestGroupMan>
+ (std::move(requestGroups), MAX_CONCURRENT_DOWNLOADS, op);
+ requestGroupMan->initWrDiskCache();
+ e->setRequestGroupMan(std::move(requestGroupMan));
+ }
e->setFileAllocationMan(make_unique<FileAllocationMan>());
#ifdef ENABLE_MESSAGE_DIGEST
e->setCheckIntegrityMan(make_unique<CheckIntegrityMan>());