Click here to Skip to main content
15,895,423 members
Home / Discussions / C#
   

C#

 
GeneralRe: Removing refrences or objects ? Garbage collector Pin
lmoelleb23-Oct-07 21:27
lmoelleb23-Oct-07 21:27 
GeneralRe: Removing refrences or objects ? Garbage collector Pin
N a v a n e e t h23-Oct-07 21:32
N a v a n e e t h23-Oct-07 21:32 
GeneralRe: Removing refrences or objects ? Garbage collector Pin
lmoelleb23-Oct-07 22:45
lmoelleb23-Oct-07 22:45 
GeneralRe: Removing refrences or objects ? Garbage collector Pin
N a v a n e e t h23-Oct-07 23:01
N a v a n e e t h23-Oct-07 23:01 
GeneralRe: Removing refrences or objects ? Garbage collector Pin
Scott Dorman24-Oct-07 1:18
professionalScott Dorman24-Oct-07 1:18 
GeneralRe: Removing refrences or objects ? Garbage collector Pin
Scott Dorman24-Oct-07 1:19
professionalScott Dorman24-Oct-07 1:19 
GeneralRe: Removing refrences or objects ? Garbage collector Pin
Scott Dorman24-Oct-07 1:36
professionalScott Dorman24-Oct-07 1:36 
GeneralRe: Removing refrences or objects ? Garbage collector Pin
lmoelleb24-Oct-07 2:35
lmoelleb24-Oct-07 2:35 
With regards to calling Dispose(false) from the finalizer, I stole the idea from these guys:
MSDN[^]

Just out of curiosity - who should ever call Dispose(false) if not the finalizer?

Moving GC SuppressFinalize is correct - I was typing from memory and trying to make sure the code did the right thing more than making sure it looked correct. Which was probably a mistake, but still better than making sure it looks correct but doesn't do the right thing. The way my code is written SuppressFinalize could be called multiple time for derived classes (yes, Dispose(bool) should be virtual and protected). It should not break anything but obviously isn't optimal.

With regards to suppress finalize I do agree there is an extra performance hit even when calling SuppressFinalize, and I should have used the term "minimize" performance hit. With regards to promotion, here is one of the sources confirming this (they might be wrong, but I have no reason to doubt them): MSDN Magazine[^]. I have not found any references to the finalizer queue management being a significent performance problem compared to the longer living objects on MSDN, but maybe I just missed it.
GeneralRe: Removing refrences or objects ? Garbage collector Pin
Scott Dorman24-Oct-07 12:46
professionalScott Dorman24-Oct-07 12:46 
GeneralRe: Removing refrences or objects ? Garbage collector Pin
Scott Dorman24-Oct-07 1:22
professionalScott Dorman24-Oct-07 1:22 
Questionupdate from combobo to textbox Pin
kabutar23-Oct-07 19:54
kabutar23-Oct-07 19:54 
AnswerRe: update from combobo to textbox Pin
Christian Graus23-Oct-07 20:02
protectorChristian Graus23-Oct-07 20:02 
GeneralRe: update from combobo to textbox Pin
kabutar23-Oct-07 20:07
kabutar23-Oct-07 20:07 
Questioninsertion of nature of comment row. [modified] Pin
alok217123-Oct-07 19:43
alok217123-Oct-07 19:43 
AnswerRe: insertion of nature of comment row. Pin
Christian Graus23-Oct-07 19:51
protectorChristian Graus23-Oct-07 19:51 
AnswerRe: insertion of nature of comment row. Pin
N a v a n e e t h23-Oct-07 19:53
N a v a n e e t h23-Oct-07 19:53 
AnswerRe: insertion of nature of comment row. Pin
Guffa23-Oct-07 20:26
Guffa23-Oct-07 20:26 
QuestionHow to show current progress and progress bar..? Pin
Pankaj - Joshi23-Oct-07 19:36
Pankaj - Joshi23-Oct-07 19:36 
AnswerRe: How to show current progress and progress bar..? Pin
Christian Graus23-Oct-07 19:56
protectorChristian Graus23-Oct-07 19:56 
AnswerRe: How to show current progress and progress bar..? Pin
Abhijit Jana23-Oct-07 21:25
professionalAbhijit Jana23-Oct-07 21:25 
QuestionFinding Address of the labels back ground image Pin
sindhutiwari23-Oct-07 19:18
sindhutiwari23-Oct-07 19:18 
QuestionHow to sign digital certificate using vs.net 2005 IDE... Pin
Pankaj - Joshi23-Oct-07 18:41
Pankaj - Joshi23-Oct-07 18:41 
QuestionHow to add home page in start menu...? Pin
Pankaj - Joshi23-Oct-07 18:34
Pankaj - Joshi23-Oct-07 18:34 
AnswerRe: How to add home page in start menu...? Pin
N a v a n e e t h23-Oct-07 18:44
N a v a n e e t h23-Oct-07 18:44 
GeneralRe: How to add home page in start menu...? Pin
Pankaj - Joshi23-Oct-07 18:47
Pankaj - Joshi23-Oct-07 18:47 

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.