summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2019-02-17 14:02:03 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2019-02-17 14:02:03 +0000
commit354616b7adff92b0f4395253dfdcd1b093df4cea (patch)
treeea6520c5ea82ebd09fc290f2fc12d2fd10d3dc75
parentEnable (most) high integrity checks (not for tests) (diff)
downloadlibadhocutil-354616b7adff92b0f4395253dfdcd1b093df4cea.tar.bz2
libadhocutil-354616b7adff92b0f4395253dfdcd1b093df4cea.tar.xz
libadhocutil-354616b7adff92b0f4395253dfdcd1b093df4cea.zip
Prevent copying and moving of ResourcePools
-rw-r--r--libadhocutil/resourcePool.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libadhocutil/resourcePool.h b/libadhocutil/resourcePool.h
index 609d710..9bb03f6 100644
--- a/libadhocutil/resourcePool.h
+++ b/libadhocutil/resourcePool.h
@@ -60,6 +60,13 @@ namespace AdHoc {
ResourcePool(unsigned int maxSize, unsigned int keep);
virtual ~ResourcePool();
+ ResourcePool() = delete;
+ ResourcePool(const ResourcePool &) = delete;
+ ResourcePool(ResourcePool &&) = delete;
+
+ void operator=(const ResourcePool &) = delete;
+ void operator=(ResourcePool &&) = delete;
+
/// Get a resource from the pool (maybe cached, maybe constructed afresh)
ResourceHandle<Resource> get();
/// Get a resource from the pool (with timeout on max size of pool)