Re: StatusStrip control leaks its collection items
- From: "Peter Duniho" <NpOeStPeAdM@xxxxxxxxxxxxxxxx>
- Date: Thu, 10 Jul 2008 18:00:50 -0700
On Thu, 10 Jul 2008 13:55:31 -0700, <carl.clawson@xxxxxxxxxxxxx> wrote:
On Jul 10, 12:52 pm, Family Tree Mike
<FamilyTreeM...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
It would seem to make sense that you would have issues if you don't dispose
something that can be disposed.
I don't expect to have to dispose things explicitly unless there's a
reason that I need to have it done at a specific point in the code.
That's what the garbage collector is for.
This is categorically WRONG.
Jack's reply addresses this, but because it's so important, let me be very clear: if an object implements IDisposable, it's _essential_ that you call Dispose() on the object when you're done with it. The garbage collector is for releasing _managed_ memory. _Disposing_ objects is the exact opposite of "what the garbage collector is for".
Pete
.
- Follow-Ups:
- Re: StatusStrip control leaks its collection items
- From: carl . clawson
- Re: StatusStrip control leaks its collection items
- From: Jonas Yans
- Re: StatusStrip control leaks its collection items
- References:
- StatusStrip control leaks its collection items
- From: carl . clawson
- RE: StatusStrip control leaks its collection items
- From: Family Tree Mike
- Re: StatusStrip control leaks its collection items
- From: carl . clawson
- StatusStrip control leaks its collection items
- Prev by Date: Re: How catch changing of color system settings?
- Next by Date: Re: StatusStrip control leaks its collection items
- Previous by thread: Re: StatusStrip control leaks its collection items
- Next by thread: Re: StatusStrip control leaks its collection items
- Index(es):
Relevant Pages
|