Re: Dispose(bool), Idisposable, form closing etc.
- From: Brian Gideon <briangideon@xxxxxxxxx>
- Date: Wed, 21 Nov 2007 08:07:02 -0800 (PST)
On Nov 21, 2:16 am, Peter Duniho <NpOeStPe...@xxxxxxxxxxxxxxxx> wrote:
[snip]
However, you're right that parameters are treated differently from
local variables, and as long as the parameter references the instance
for the duration of the call to the method, the instance won't be
collected.
[snip]
I don't know if I'm convinced of that. You may have been right the
first time. What made you change your mind? Is there a section in
the CLI specification that talks about this?
Obviously, a parameter can be collected during the execution of an
unmanaged function. That's the most important reason for the
existence of GC.KeepAlive. But, I want to know if a parameter can be
collected before the completion of a managed function. I haven't seen
conclusive documentation that guarentees that it won't. In fact, I
don't see any reason why the runtime couldn't support that
optimization. Comments?
.
- 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
- Re: Dispose(bool), Idisposable, form closing etc.
- From: Michael C
- Re: Dispose(bool), Idisposable, form closing etc.
- From: Peter Duniho
- Re: Dispose(bool), Idisposable, form closing etc.
- From: Michael C
- Re: Dispose(bool), Idisposable, form closing etc.
- From: Peter Duniho
- Re: Dispose(bool), Idisposable, form closing etc.
- From: Michael C
- Re: Dispose(bool), Idisposable, form closing etc.
- From: Peter Duniho
- Re: Dispose(bool), Idisposable, form closing etc.
- From: Michael C
- Re: Dispose(bool), Idisposable, form closing etc.
- From: Peter Duniho
- Re: Dispose(bool), Idisposable, form closing etc.
- From: Peter Duniho
- Dispose(bool), Idisposable, form closing etc.
- Prev by Date: Re: Identifying C# job failures in SQL jobs
- Next by Date: Re: Selecting text in another application and importing it into mine
- Previous by thread: Re: Dispose(bool), Idisposable, form closing etc.
- Next by thread: Re: Dispose(bool), Idisposable, form closing etc.
- Index(es):
Relevant Pages
|