From: Bernd Prager Date: August 3 2012 8:57pm Subject: Re: connection list problems List-Archive: http://lists.mysql.com/plusplus/9528 Message-Id: <3567EFD3-5884-416E-9FAB-5D8841BE5984@prager.ws> MIME-Version: 1.0 (1.0) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Thank you Warren. I see your points.=20 -- Bernd Sent from my iPhone On Aug 3, 2012, at 4:05 PM, Warren Young wrote: > On 8/3/2012 12:58 PM, Bernd Prager wrote: >>=20 >> void Dal::putConnection(boost::any connection) { >> if((int)connectionPool.size() =3D=3D connectionPoolMax) { >> // pool is full >> boost::lock_guard lock(mutex); >> destroyConnection(connection); >> } >> connectionPool.push_back(connection); >> } >=20 > Explain to me how this doesn't insert destroyed connections into the pool w= hen you hit the pool's size limit. >=20 > Another likely problem is that this looks like it will create value copies= of the Connection objects, which causes MySQL DB server re-connection. You= 'd do better here to use reference semantics. >=20 > --=20 > MySQL++ Mailing List > For list archives: http://lists.mysql.com/plusplus > To unsubscribe: http://lists.mysql.com/plusplus >=20