Nick Kew wrote:
On Thu, 9 Dec 2004, Garrett Rooney wrote:


This really seems kind of odd, and I'm wondering if it's just because of
my Subversion background.  So the cleanup that closes the connection is
registered with the first pool, but the dbd is actually allocated out of
the second?


No, the second is for temporary stuff.  The mysql driver uses it
to parse the params string into strings that can be passed to
mysql_real_connect.  There's an assumption in there that the
driver itself won't be allocating anything long-lasting on a pool.

But it's temporary allocation. You create a temp subpool at the beginning of the function, use it for the parsing and whatnot, then kill the pool at the end. Yes, there is some temporary allocation from the long lived pool, but the memory is available for other use as soon as the function is over. I don't see why a second pool is needed.


-garrett

Reply via email to