Boost logo

Boost Users :

From: Alejandro Martinez (elpeque2_at_[hidden])
Date: 2008-08-18 16:11:30


can i use some class's (a kind of factory) member be used as a deallocator
in a shared_ptr?

like to do something like this:

boost::shared_ptr<mysqlpp::Connection> cp(sDbPool->grab(),
boost::bind(&mysqlpp::ConnectionPool::release, sDbPool));

where sDbPool is a shared_ptr to the "factory/pool manager".

i tryed just that, but visual studio express 2008 keeps crashin on me. (the
compiler crashes, not the program).

any ideas?


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net