Click here to Skip to main content
15,915,164 members
Home / Discussions / C#
   

C#

 
AnswerRe: References to an object Pin
Christian Graus11-Mar-07 11:10
protectorChristian Graus11-Mar-07 11:10 
GeneralRe: References to an object Pin
Zoltan Balazs11-Mar-07 12:29
Zoltan Balazs11-Mar-07 12:29 
GeneralRe: References to an object Pin
badgrs11-Mar-07 14:09
badgrs11-Mar-07 14:09 
GeneralRe: References to an object Pin
S. Senthil Kumar11-Mar-07 15:02
S. Senthil Kumar11-Mar-07 15:02 
GeneralRe: References to an object Pin
Scott Dorman11-Mar-07 15:32
professionalScott Dorman11-Mar-07 15:32 
GeneralRe: References to an object Pin
Zoltan Balazs11-Mar-07 17:31
Zoltan Balazs11-Mar-07 17:31 
GeneralRe: References to an object Pin
Scott Dorman11-Mar-07 17:49
professionalScott Dorman11-Mar-07 17:49 
AnswerRe: References to an object Pin
Guffa11-Mar-07 16:26
Guffa11-Mar-07 16:26 
Zoltan Balazs wrote:
Is there a way to find out what reference is keeping alive an object after garbage collection?


Not really.

Do you think that you have an object that is not collected? How have you come to this conclusion then?

Do you think that there is a reference somewhere? It doesn't have to be a reference that keeps an object from being collected. Perhaps the garbage collector just didn't collect the specific heap generation that contains the object.

If it's a large object (>85 kiB), it's allocated in the large objects heap. that heap never shrinks, even if the objects in it are collected. If you are monitoring memory usage, you won't see a direct change.

If the object has a finalizer, it will survive at least the first garbage collection, as the object has to be finalized before it can be collected.


---
single minded; short sighted; long gone;

GeneralRe: References to an object Pin
Zoltan Balazs11-Mar-07 17:41
Zoltan Balazs11-Mar-07 17:41 
GeneralRe: References to an object Pin
Zoltan Balazs12-Mar-07 7:15
Zoltan Balazs12-Mar-07 7:15 
QuestionHow to assign value to generic list member Pin
AndrusM11-Mar-07 10:46
AndrusM11-Mar-07 10:46 
AnswerRe: How to assign value to generic list member Pin
S. Senthil Kumar11-Mar-07 14:07
S. Senthil Kumar11-Mar-07 14:07 
QuestionAppDomain + Reflection Pin
AJ12311-Mar-07 9:58
AJ12311-Mar-07 9:58 
AnswerRe: AppDomain + Reflection Pin
S. Senthil Kumar11-Mar-07 14:11
S. Senthil Kumar11-Mar-07 14:11 
QuestionDataGridView IDENTITY column binding problem Pin
Deian11-Mar-07 9:13
Deian11-Mar-07 9:13 
AnswerRe: DataGridView IDENTITY column binding problem Pin
Deian11-Mar-07 11:31
Deian11-Mar-07 11:31 
Questionsimple 2d graphics with c# Pin
liquidfluid11-Mar-07 8:35
liquidfluid11-Mar-07 8:35 
AnswerRe: simple 2d graphics with c# Pin
Ed.Poore11-Mar-07 8:50
Ed.Poore11-Mar-07 8:50 
Questionmarshaling of the const char * Pin
MinaFawzi11-Mar-07 6:21
MinaFawzi11-Mar-07 6:21 
AnswerRe: marshaling of the const char * Pin
Ed.Poore11-Mar-07 7:52
Ed.Poore11-Mar-07 7:52 
QuestionPassing member variables as private method arguments? Pin
David Veeneman11-Mar-07 5:38
David Veeneman11-Mar-07 5:38 
AnswerRe: Passing member variables as private method arguments? Pin
S. Senthil Kumar11-Mar-07 5:55
S. Senthil Kumar11-Mar-07 5:55 
GeneralRe: Passing member variables as private method arguments? Pin
David Veeneman11-Mar-07 7:32
David Veeneman11-Mar-07 7:32 
AnswerRe: Passing member variables as private method arguments? Pin
Christian Graus11-Mar-07 4:55
protectorChristian Graus11-Mar-07 4:55 
AnswerRe: Passing member variables as private method arguments? Pin
Leslie Sanford11-Mar-07 16:52
Leslie Sanford11-Mar-07 16:52 

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.