Re: Dispose(bool), Idisposable, form closing etc.
- From: "Michael C" <mike@xxxxxxxxxx>
- Date: Wed, 21 Nov 2007 10:50:15 +1100
"rbrowning1958" <RBrowning1958@xxxxxxxxx> wrote in message
news:db58258c-fe2b-40f2-be53-9b5c2f979a5c@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
5. With regard to garbage collecting - doesn't Peter have it correct
where he says the form is not garbage collected because it is
referenced by application.openForms?
I'm just guessing here but I'd imagine that application.openForms keeps what
is called a weak reference to the form. This means that if all other
references are dropped then the GC can kill the references in openForms.
6. Brian mentioned that some class authors write property getters to
return data even after the form has been destroyed - I don't
understand this. Doesn't this mean the property getter has to be
static - and where would it savbe the data? In static class vars? That
implies I only have one instance of the form, right?
No, they are instance members. Remember the form is only hidden so
everything can be accessed still
Michael
.
- Follow-Ups:
- Re: Dispose(bool), Idisposable, form closing etc.
- From: Peter Duniho
- Re: Dispose(bool), Idisposable, form closing etc.
- References:
- Dispose(bool), Idisposable, form closing etc.
- From: rbrowning1958
- Re: Dispose(bool), Idisposable, form closing etc.
- From: Nicholas Paldino [.NET/C# MVP]
- Re: Dispose(bool), Idisposable, form closing etc.
- From: rbrowning1958
- Dispose(bool), Idisposable, form closing etc.
- Prev by Date: Re: Visual Studio 2008 released
- Next by Date: Re: what is the best datatype for..
- Previous by thread: Re: Dispose(bool), Idisposable, form closing etc.
- Next by thread: Re: Dispose(bool), Idisposable, form closing etc.
- Index(es):
Relevant Pages
|
Loading