Subject | Re: Should (Could) FBStatements be held in WeakHashMap |
---|---|
Author | Roman Rokytskyy |
Post date | 2003-04-04T15:48:11Z |
Mark,
with AspectJ, but your idea about WeakHashMap might work. Can you try
replacing that HashMap with WeakHashMap and adding finalize() method
to FBStatement:
protected void finalize() throws SQLException {
if (!closed)
close();
}
If you do not get resource leaks on server, then I think we can commit
your change. Sorry for arguing so long... Also I'm not convinced that
this is 100% correct, but we can try.
Thanks!
Roman
> Well yes, I agree sort off, it's nice to explicitly know about openI'm still thinking about your suggestion. I'm sure one cannot solve it
> statements, but when it's this reference that is the only link that
> holds them open, wouldn't it be nice to then close them.
with AspectJ, but your idea about WeakHashMap might work. Can you try
replacing that HashMap with WeakHashMap and adding finalize() method
to FBStatement:
protected void finalize() throws SQLException {
if (!closed)
close();
}
If you do not get resource leaks on server, then I think we can commit
your change. Sorry for arguing so long... Also I'm not convinced that
this is 100% correct, but we can try.
Thanks!
Roman