c++ - Soci Session is not releasing connection -
i'm using soci making app interact databases , use mysql server test. have wrapped soci simple class call session.open() in connect method of class
m_session.open(soci::mysql, connstring); then in destructor call close method
m_session.close(); but when use class few times (creating , destroying objects of class) find soci fails connects mysql server error many connections. i'm confused since call close method on destructor, suppose soci should release connection. checking soci docs cannot see close().
is there way force soci::session release connection?
i found somehow destructor not getting called because had unhandled exception in 1 of class methods. re-designed class , handled exception too. now!
Comments
Post a Comment