destructors, how?

Ragnar Hojland Espinosa ragnar at linalco.com
Tue Oct 22 17:07:38 UTC 2002


On Tue, Oct 22, 2002 at 05:20:57PM +0100, Peter Crowther wrote:
> > Ah well.. at least I can add the closes by hand :/  but that 
> > means leaks and sort of rules out to have decent db 
> > connection pools in any way I can think of.. so I must be 
> > missing something.
> 
> Eh?  If you're pooling, you need some kind of pool manager anyway ---
> which will undoubtedly hold references to all connections and know when
> connections should be closed.  Do you have some kind of magic here that

No magic, as theres no pooling yet :)  My issue is that "know when
connections should be closed" is when the db handle is ready to be GCed.. so
I thought I would just use some "destructors" and all would be easy.. but
there are none.  So I'm not really sure on how to figure out when I should
close a connection, unless I explicitely close it. 

> I don't understand (very likely!) - if so, please explain how you can do
> pooling without a pool manager, because I want to nick the idea and use
> it :-).

I'm gonna try Bryce's block thing.  :)
-- 
Ragnar Hojland - Project Manager
Linalco "Especialistas Linux y en Software Libre"
Tel: +34-91-5970074 Fax: +34-91-5970083



More information about the Squeak-dev mailing list