On 27/12/2007, Warren Young wrote:
> Warren Young wrote:
> >
> > I don't have a good reason for an outsider to drain a pool, but I also
> > don't have one for why an outsider shouldn't be allowed to drain a pool.
> > So, I made this method public.
>
> On further consideration, I wonder if clear() shouldn't be overloaded,
> with one version being protected and taking a bool "force" parameter.
> If force, destroying in-use connections is allowed. Else, not.
Ah yes, making it public means you have to worry about that.
If it's private and is only used by the dtor it's reasonable to
assume/require that no connections are in use when the pool is
destroyed.