Pavel Vozenilek schrieb:
"Malte Starostik" wrote:
I'm using a wrapper class to automate postconstruction and predestruction. A preliminarily boostified version (added licence header, changed namespace to boost) is available at http://malte.homeip.net/~malte/prepost/
How is your solution better than to have - factory function/class for post-constructor and - deleter attached to shared_ptr for pre-destructor?
I guess only in that the latter is too obvious ;-) Of course I've used that solution before, but when I needed it this time it didn't occur to me and I started with prepost.hpp, of course after that I didn't consider an alternative to the whole approach, only implementation details. Oh well, coding throughout the holidays->lack of sleep->getting caught up. But thanks for reminding me, now I really don't see the need to anymore, not even for myself. Cheers, Malte, slightly embarassed (in the positive way :-) indeed