diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-07-06 00:59:43 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-07-06 15:56:08 +0900 |
| commit | 68f2a333553dff378483cd628ba52aa6c5de63b8 (patch) | |
| tree | 84dac597c645e8e63470284eed3fee6d98c9fda3 /src/DownloadEngineFactory.cc | |
| parent | 697c1008f715669cdd6c8e5b7610a20182375253 (diff) | |
DownloadEngine: Use std::unique_ptr for RequestGroupMan
Diffstat (limited to 'src/DownloadEngineFactory.cc')
| -rw-r--r-- | src/DownloadEngineFactory.cc | 11 |
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>()); |
