=?iso-8859-1?Q?Data_Base_Connection_Question=BF=3F?= by Paul
Paul
Tue Dec 02 23:23:39 CST 2003
Nope. You must close it. It will probably be released
eventually when the connection is invalid and the
connection pooler checks the connection associated with
that destroyed object (ie. connection lifetime has
expired). But this is bad practice, is indeterminate and
all recommendations suggest to open late, close early but
make sure you close it when complete. ie. In the finally
block of a try..catch...finally.
- Paul Glavich
>-----Original Message-----
>
>
>Hey, hi all
>
>
>It's said framework's garbage collector destroy all
>objects in applications or whatever, so my cuestion is:
>
>if i have a Database connection object and if i dont
close
>this connection, when the garbage colletor destroy this
>object it is closing the connection????
>
>
>And how uneffcicient is it???, i mean if i dont close my
>connection and i let this task for garbage collector (in
>the case that it is possible)
>
>
>.
>