aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/nfs
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-10-19 15:57:00 +0200
committerMax Kellermann <max@duempel.org>2015-10-19 15:57:30 +0200
commit8d2370635408b9acd392843de96179383a95a4bf (patch)
tree7c1572bedb11ffea8eb8dfaa9a4c78a3e1c64d2f /src/lib/nfs
parent62bfb1a2731ba6c7ee27009316109ef03a60d950 (diff)
downloadmpd-8d2370635408b9acd392843de96179383a95a4bf.tar.gz
mpd-8d2370635408b9acd392843de96179383a95a4bf.tar.xz
mpd-8d2370635408b9acd392843de96179383a95a4bf.zip
util/DeleteDisposer: new utility class
Diffstat (limited to 'src/lib/nfs')
-rw-r--r--src/lib/nfs/Manager.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/lib/nfs/Manager.cxx b/src/lib/nfs/Manager.cxx
index 8b0a9ba9a..1cbf18ff1 100644
--- a/src/lib/nfs/Manager.cxx
+++ b/src/lib/nfs/Manager.cxx
@@ -21,6 +21,7 @@
#include "Manager.hxx"
#include "event/Loop.hxx"
#include "Log.hxx"
+#include "util/DeleteDisposer.hxx"
#include <string.h>
@@ -65,9 +66,7 @@ NfsManager::~NfsManager()
CollectGarbage();
- connections.clear_and_dispose([](ManagedConnection *c){
- delete c;
- });
+ connections.clear_and_dispose(DeleteDisposer());
}
NfsConnection &
@@ -95,9 +94,7 @@ NfsManager::CollectGarbage()
{
assert(GetEventLoop().IsInside());
- garbage.clear_and_dispose([](ManagedConnection *c){
- delete c;
- });
+ garbage.clear_and_dispose(DeleteDisposer());
}
void