Subject: [boost] [Smart Pointers]
From: Rahul Sr (srivasrrahul_at_[hidden])
Date: 2012-12-08 22:32:12
This is my first post though so please bear with my sentences.
I have used scoped_ptr but this is too tied with new/delete semantics i.e.
can't use it with pointers which gets allocated from specialized memory
A * allocate();
void deallocate(A * p);
This specially happens when I use scoped pointer for C like
Can I modify scoped pointer to have release semantics which is user defined:
static void releaseA(T * p)
static void releaseA(A * p)
template<typename T,typemame ReleasePolicy = DefaultReleasePolicy<T> >
Is this fine? Let me know your thoughts.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk