Click here to Skip to main content
15,887,464 members
Home / Discussions / C#
   

C#

 
QuestionListBox Pin
minniemooo31-Aug-07 3:12
minniemooo31-Aug-07 3:12 
AnswerRe: ListBox Pin
pmarfleet31-Aug-07 3:47
pmarfleet31-Aug-07 3:47 
AnswerRe: ListBox Pin
\laddie31-Aug-07 4:31
\laddie31-Aug-07 4:31 
QuestionDifference b/w dispose() & finalize() Pin
Dineshraj31-Aug-07 1:48
Dineshraj31-Aug-07 1:48 
AnswerRe: Difference b/w dispose() & finalize() Pin
Colin Angus Mackay31-Aug-07 2:00
Colin Angus Mackay31-Aug-07 2:00 
GeneralRe: Difference b/w dispose() & finalize() Pin
martin_hughes31-Aug-07 2:48
martin_hughes31-Aug-07 2:48 
GeneralRe: Difference b/w dispose() & finalize() Pin
Pete O'Hanlon31-Aug-07 3:12
mvePete O'Hanlon31-Aug-07 3:12 
AnswerRe: Difference b/w dispose() & finalize() Pin
Pete O'Hanlon31-Aug-07 2:07
mvePete O'Hanlon31-Aug-07 2:07 
Dispose is a method on an interface (IDisposable) that tells you that you can free up some resources. It is not guaranteed to be called, but can be called either explicitly via the MyObject.Dispose method, or implicitly when the instance has been wrapped in an using block, e.g.
using (SqlConnection conn = new SqlConnection())
{
 ..
}  // The Dispose method will have been called here.
The finalizer is run by the garbage collector, so you have no idea when it will run (under normal conditions that is - it is possible to explicitly call a Finalizer, but this is generally bad practice). Now, if you implement IDisposable.Dispose() then it is normally good practice to suppress the Finalizer. This is done by calling the method GC.SuppressFinalize() in the Dispose method. To this end, I tend to write a message to the trace logs if I get into a Finalizer when I have a Dispose method. By doing this, I can see where I haven't freed up resources explicitly.

Deja View - the feeling that you've seen this post before.

GeneralRe: Difference b/w dispose() & finalize() Pin
Colin Angus Mackay31-Aug-07 3:12
Colin Angus Mackay31-Aug-07 3:12 
AnswerRe: Difference b/w dispose() & finalize() Pin
Vasudevan Deepak Kumar31-Aug-07 2:31
Vasudevan Deepak Kumar31-Aug-07 2:31 
AnswerRe: Difference b/w dispose() & finalize() Pin
Scott Dorman31-Aug-07 8:18
professionalScott Dorman31-Aug-07 8:18 
AnswerRe: Difference b/w dispose() & finalize() Pin
Scott Dorman31-Aug-07 8:19
professionalScott Dorman31-Aug-07 8:19 
QuestionReceiving Mail from an Exchange Server Pin
Programm3r31-Aug-07 1:20
Programm3r31-Aug-07 1:20 
AnswerRe: Receiving Mail from an Exchange Server Pin
Vasudevan Deepak Kumar31-Aug-07 2:30
Vasudevan Deepak Kumar31-Aug-07 2:30 
Questionhow use Line Break in Gios PDF .NET library [modified] Pin
sanjeevRanjan31-Aug-07 1:07
sanjeevRanjan31-Aug-07 1:07 
AnswerRe: how use Line Break in Gios PDF .NET library Pin
Vasudevan Deepak Kumar31-Aug-07 2:34
Vasudevan Deepak Kumar31-Aug-07 2:34 
Questionquery string encryption Pin
Sonia Gupta31-Aug-07 1:05
Sonia Gupta31-Aug-07 1:05 
AnswerRe: query string encryption Pin
Pete O'Hanlon31-Aug-07 1:08
mvePete O'Hanlon31-Aug-07 1:08 
GeneralRe: query string encryption Pin
Sonia Gupta31-Aug-07 1:32
Sonia Gupta31-Aug-07 1:32 
GeneralRe: query string encryption Pin
Pete O'Hanlon31-Aug-07 1:58
mvePete O'Hanlon31-Aug-07 1:58 
AnswerRe: query string encryption Pin
Vasudevan Deepak Kumar31-Aug-07 2:33
Vasudevan Deepak Kumar31-Aug-07 2:33 
Questionasp.net panel like code project Pin
mfmaneef31-Aug-07 1:02
mfmaneef31-Aug-07 1:02 
AnswerRe: asp.net panel like code project Pin
\laddie31-Aug-07 1:16
\laddie31-Aug-07 1:16 
QuestionInput String Pin
minniemooo31-Aug-07 0:51
minniemooo31-Aug-07 0:51 
AnswerRe: Input String Pin
Colin Angus Mackay31-Aug-07 0:59
Colin Angus Mackay31-Aug-07 0:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.