Click here to Skip to main content
15,883,901 members
Home / Discussions / C#
   

C#

 
AnswerRe: Small question on Finalizers Pin
Dave Kreskowiak2-Jun-16 9:07
mveDave Kreskowiak2-Jun-16 9:07 
GeneralRe: Small question on Finalizers Pin
Foothill2-Jun-16 9:55
professionalFoothill2-Jun-16 9:55 
GeneralRe: Small question on Finalizers Pin
Dave Kreskowiak2-Jun-16 10:53
mveDave Kreskowiak2-Jun-16 10:53 
GeneralRe: Small question on Finalizers Pin
Foothill2-Jun-16 11:22
professionalFoothill2-Jun-16 11:22 
GeneralRe: Small question on Finalizers Pin
Dave Kreskowiak2-Jun-16 11:58
mveDave Kreskowiak2-Jun-16 11:58 
GeneralRe: Small question on Finalizers Pin
Foothill3-Jun-16 5:10
professionalFoothill3-Jun-16 5:10 
AnswerRe: Small question on Finalizers Pin
Richard Deeming2-Jun-16 9:34
mveRichard Deeming2-Jun-16 9:34 
GeneralRe: Small question on Finalizers Pin
Foothill2-Jun-16 11:02
professionalFoothill2-Jun-16 11:02 
Chapter 5 really helped to clear up some of my confusion with finalizers. I don't know why but it was easier to understand then the articles on IDisposable or garbage collection as neither of them really adequately explained the 'why' of the dispose pattern. I realized that if an unmanged resource is persisted for a lengthy period of time during execution, implement the Dispose pattern and put a Dispose call in the finalizer to ensure that any Win32 Handles (theads and such) get released back to the OS.

I also finally understand the reason for all those GG.SuppressFinalize(this) calls I've seen spattered about the internet. You put a backup Dispose() call in the finalizer but if you remember to call your normal Dispose(), the finalizer shouldn't be called because it would throw the ObjectAlreadyDisposed exception.

I swear, sometimes you can stare at the same articles on Garbage Collection and IDisposable dozens of times without parsing the whole concept together then one time, bang, "Oh, that's why it works that way!?" D'Oh! | :doh:

Thanks for the links. They were very informative.
if (Object.DividedByZero == true) { Universe.Implode(); }
Meus ratio ex fortis machina. Simplicitatis de formae ac munus. -Foothill, 2016

QuestionHow to convert pounds(Lb) to ounce(Oz) and Ounce(Oz) to Pounds(Lb) in C#.Net code Pin
somagunasekaran2-Jun-16 1:35
somagunasekaran2-Jun-16 1:35 
AnswerRe: How to convert pounds(Lb) to ounce(Oz) and Ounce(Oz) to Pounds(Lb) in C#.Net code Pin
Richard Deeming2-Jun-16 2:11
mveRichard Deeming2-Jun-16 2:11 
AnswerRe: How to convert pounds(Lb) to ounce(Oz) and Ounce(Oz) to Pounds(Lb) in C#.Net code Pin
OriginalGriff2-Jun-16 4:08
mveOriginalGriff2-Jun-16 4:08 
GeneralRe: How to convert pounds(Lb) to ounce(Oz) and Ounce(Oz) to Pounds(Lb) in C#.Net code Pin
Richard MacCutchan2-Jun-16 4:35
mveRichard MacCutchan2-Jun-16 4:35 
GeneralRe: How to convert pounds(Lb) to ounce(Oz) and Ounce(Oz) to Pounds(Lb) in C#.Net code Pin
OriginalGriff2-Jun-16 4:57
mveOriginalGriff2-Jun-16 4:57 
GeneralRe: How to convert pounds(Lb) to ounce(Oz) and Ounce(Oz) to Pounds(Lb) in C#.Net code Pin
Pete O'Hanlon2-Jun-16 5:37
mvePete O'Hanlon2-Jun-16 5:37 
GeneralRe: How to convert pounds(Lb) to ounce(Oz) and Ounce(Oz) to Pounds(Lb) in C#.Net code Pin
OriginalGriff2-Jun-16 6:05
mveOriginalGriff2-Jun-16 6:05 
GeneralRe: How to convert pounds(Lb) to ounce(Oz) and Ounce(Oz) to Pounds(Lb) in C#.Net code Pin
Mycroft Holmes2-Jun-16 13:03
professionalMycroft Holmes2-Jun-16 13:03 
AnswerRe: How to convert pounds(Lb) to ounce(Oz) and Ounce(Oz) to Pounds(Lb) in C#.Net code Pin
Gerry Schmitz2-Jun-16 4:58
mveGerry Schmitz2-Jun-16 4:58 
Questionplz introduce appropriate component Pin
Member 125609791-Jun-16 22:15
Member 125609791-Jun-16 22:15 
AnswerRe: plz introduce appropriate component Pin
OriginalGriff1-Jun-16 23:07
mveOriginalGriff1-Jun-16 23:07 
AnswerRe: plz introduce appropriate component Pin
Gerry Schmitz2-Jun-16 5:20
mveGerry Schmitz2-Jun-16 5:20 
AnswerRe: plz introduce appropriate component Pin
Eddy Vluggen3-Jun-16 0:06
professionalEddy Vluggen3-Jun-16 0:06 
QuestionTest Methods Are Grayed out Pin
MadDashCoder1-Jun-16 19:24
MadDashCoder1-Jun-16 19:24 
AnswerRe: Test Methods Are Grayed out Pin
Gerry Schmitz2-Jun-16 5:13
mveGerry Schmitz2-Jun-16 5:13 
QuestionShow message box on top from windows tray application. Pin
raydebojyoti1-Jun-16 0:25
raydebojyoti1-Jun-16 0:25 
AnswerRe: Show message box on top from windows tray application. Pin
OriginalGriff1-Jun-16 1:08
mveOriginalGriff1-Jun-16 1:08 

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.