X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/a846a8cdfbbb59f5f545db03dd7c5fee43c2056a..1ba6903ecce638fac26bc5e15e66905c9d06675e:/Pooling.hpp diff --git a/Pooling.hpp b/Pooling.hpp index c907662..d1ee2b7 100644 --- a/Pooling.hpp +++ b/Pooling.hpp @@ -61,8 +61,8 @@ class CYPool { apr_pool_t *pool_; public: - CYPool() { - _aprcall(apr_pool_create(&pool_, NULL)); + CYPool(apr_pool_t *pool = NULL) { + _aprcall(apr_pool_create(&pool_, pool)); } ~CYPool() { @@ -88,6 +88,12 @@ class CYPool { struct CYData { apr_pool_t *pool_; + unsigned count_; + + CYData() : + count_(1) + { + } virtual ~CYData() { } @@ -107,7 +113,6 @@ struct CYData { static void operator delete(void *data) { apr_pool_destroy(reinterpret_cast(data)->pool_); } - }; template