Click here to Skip to main content
16,016,088 members
Home / Discussions / C#
   

C#

 
GeneralRe: Should I implement IDisposable? Pin
DaveyM6926-May-08 7:59
professionalDaveyM6926-May-08 7:59 
GeneralRe: Should I implement IDisposable? Pin
Guffa26-May-08 11:37
Guffa26-May-08 11:37 
GeneralRe: Should I implement IDisposable? Pin
Scott Dorman26-May-08 15:00
professionalScott Dorman26-May-08 15:00 
GeneralRe: Should I implement IDisposable? Pin
S. Senthil Kumar26-May-08 20:57
S. Senthil Kumar26-May-08 20:57 
GeneralRe: Should I implement IDisposable? Pin
Scott Dorman27-May-08 1:28
professionalScott Dorman27-May-08 1:28 
GeneralRe: Should I implement IDisposable? Pin
Guffa26-May-08 21:30
Guffa26-May-08 21:30 
GeneralRe: Should I implement IDisposable? Pin
Scott Dorman27-May-08 1:24
professionalScott Dorman27-May-08 1:24 
GeneralRe: Should I implement IDisposable? Pin
Guffa27-May-08 2:21
Guffa27-May-08 2:21 
Scott Dorman wrote:
Take a look at this article from Joe Duffy


He's talking about setting references to null if you are going to keep the object that is containing the references. Does not apply.

Scott Dorman wrote:
Also, take a look at this article, and specifically the comments from Wesner


He's talking about replacing a reference with a reference to a newly created object. Does not apply.

Scott Dorman wrote:
Or the second paragraph here


He's talking about when the large objects heap is collected. Setting a reference to null doesn't change when that happens.

Scott Dorman wrote:
It does matter where objects are allocated since objects in the LOB are still collected but the LOB itself is not compacted like the regular heap.


There is of course differences depending on where the object is allocated, but nothing that affects how the garbage collector finds out if the object is collectable or not.

Scott Dorman wrote:
I never said that "If an inactive reference points to an object on the large objects heap" it turns it into an active reference.


You said that setting the reference to null would help the garbage collector if the object is on the large objects heap. The only way that would be helpful would be if the garbage collector treats references to large objects differently, which is doesn't.

Scott Dorman wrote:
What I did say was that you should set the large object to null, not necessarily anything that points to it.


The discussion was about a collection of objects, so that's what I assumed that you were also talking about. If you are talking about something completely different, you will only be causing confusion if you don't specify what it is that you are talking about.

Despite everything, the person most likely to be fooling you next is yourself.

GeneralRe: Should I implement IDisposable? Pin
DaveyM6927-May-08 11:53
professionalDaveyM6927-May-08 11:53 
GeneralRe: Should I implement IDisposable? Pin
Scott Dorman27-May-08 16:14
professionalScott Dorman27-May-08 16:14 
GeneralRe: Should I implement IDisposable? Pin
DaveyM6928-May-08 1:19
professionalDaveyM6928-May-08 1:19 
GeneralRe: Should I implement IDisposable? Pin
Scott Dorman27-May-08 16:03
professionalScott Dorman27-May-08 16:03 
GeneralRe: Should I implement IDisposable? Pin
Guffa27-May-08 21:19
Guffa27-May-08 21:19 
AnswerRe: Should I implement IDisposable? Pin
Guffa26-May-08 11:29
Guffa26-May-08 11:29 
GeneralRe: Should I implement IDisposable? Pin
DaveyM6927-May-08 1:19
professionalDaveyM6927-May-08 1:19 
QuestionPinned form Pin
netJP12L26-May-08 6:25
netJP12L26-May-08 6:25 
AnswerRe: Pinned form Pin
DaveyM6926-May-08 7:19
professionalDaveyM6926-May-08 7:19 
GeneralRe: Pinned form Pin
netJP12L26-May-08 8:56
netJP12L26-May-08 8:56 
GeneralRe: Pinned form Pin
DaveyM6926-May-08 9:09
professionalDaveyM6926-May-08 9:09 
QuestionSelect statement To display each row as colum for Gridview control Pin
Member 400849226-May-08 6:00
Member 400849226-May-08 6:00 
AnswerRe: Select statement To display each row as colum for Gridview control Pin
Ashfield26-May-08 8:09
Ashfield26-May-08 8:09 
AnswerRe: Select statement To display each row as colum for Gridview control Pin
Atif Ali Bhatti26-May-08 8:16
Atif Ali Bhatti26-May-08 8:16 
QuestionEnable custom control to be editable or intreactive in Design Mode Pin
leeoze26-May-08 3:46
leeoze26-May-08 3:46 
AnswerRe: Enable custom control to be editable or intreactive in Design Mode Pin
leppie26-May-08 4:08
leppie26-May-08 4:08 
GeneralRe: Enable custom control to be editable or intreactive in Design Mode Pin
Brady Kelly26-May-08 10:54
Brady Kelly26-May-08 10:54 

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.