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() {
struct CYData {
apr_pool_t *pool_;
+ unsigned count_;
+
+ CYData() :
+ count_(1)
+ {
+ }
virtual ~CYData() {
}
static void operator delete(void *data) {
apr_pool_destroy(reinterpret_cast<CYData *>(data)->pool_);
}
-
};
template <typename Type_>