How to destroy any old connection object when application starts?http://forums.asp.net/t/1773515.aspx/1?How+to+destroy+any+old+connection+object+when+application+starts+Sat, 25 Feb 2012 23:33:00 -050017735154849713http://forums.asp.net/p/1773515/4849713.aspx/1?How+to+destroy+any+old+connection+object+when+application+starts+How to destroy any old connection object when application starts? <p>I want to clear any old connection objects left in user's PC as soon as the Home Page of my application starts. Is it safe to run <strong>GC.Collect()&nbsp;</strong>as application loads?&nbsp;</p> 2012-02-24T16:11:12-05:004849916http://forums.asp.net/p/1773515/4849916.aspx/1?Re+How+to+destroy+any+old+connection+object+when+application+starts+Re: How to destroy any old connection object when application starts? <p>It won't hurt anything no, but the garbage collector won't release those objects unless they are properly disposed of first. If they are still in use the collector will pass over them as being active and in use.</p> 2012-02-24T18:22:35-05:004850284http://forums.asp.net/p/1773515/4850284.aspx/1?Re+How+to+destroy+any+old+connection+object+when+application+starts+Re: How to destroy any old connection object when application starts? <p>In that case, I added: <strong>connection.dispose</strong> in the <strong>finally section</strong> after the connection got closed?</p> 2012-02-25T05:04:57-05:004850435http://forums.asp.net/p/1773515/4850435.aspx/1?Re+How+to+destroy+any+old+connection+object+when+application+starts+Re: How to destroy any old connection object when application starts? <p>You can do that yeah</p> 2012-02-25T09:02:09-05:004850956http://forums.asp.net/p/1773515/4850956.aspx/1?Re+How+to+destroy+any+old+connection+object+when+application+starts+Re: How to destroy any old connection object when application starts? <p>Hello rpk2006</p> <p>In fact you can also try to use &quot;using&quot; statement to a class instance that has implemented the interface of &quot;IDisposible&quot;which will release the inner unmanaged things together</p> <p>Reguards</p> 2012-02-25T23:33:00-05:00