From 354616b7adff92b0f4395253dfdcd1b093df4cea Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 17 Feb 2019 14:02:03 +0000 Subject: Prevent copying and moving of ResourcePools --- libadhocutil/resourcePool.h | 7 +++++++ 1 file changed, 7 insertions(+) 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 get(); /// Get a resource from the pool (with timeout on max size of pool) -- cgit v1.2.3