CCW/,NET UserControl lifetime question
- From: "Dilip" <rdilipk@xxxxxxxxx>
- Date: 1 Sep 2005 18:44:34 -0700
Gurus
I am a little bit confused in trying to understand the lifecycle of
..NET
controls instantiated from unmanaged clients.
I have a .NET usercontrol being hosted using the <OBJECT /> tag (Page
level
scope) in an IE page. Here is what I already know:
A CCW is created for IE to instantiate and call methods on this user
control. Every new instance of IE that browses to the URL hosting that
control and every re-rendering of that page (due to user clicking the
Back
button or refreshing that page on the browser) increments the refcount
on
the CCW by 1 (because I am assuming when the page is re-rendered the
control
gets created once again?).
Now if I shut down all instances of IE, ideally the refcount on CCW
should
go to zero, correct?
This should further release the sole reference to the .NET usercontrol
held
by CCW, correct? This would make the usercontrol eligible for garbage
collection.
What I don't understand is in order for the garbage collector to
recognize
that the usercontrol is no longer being used, what is the _ROOT_ from
which
such unreachability is determined?
Have I phrased the question correctly?
thanks!
--Dilip
.
- Prev by Date: Word Document Object - CreateDate modify problem
- Next by Date: Re: Registration of .NET DLL for COM Interop
- Previous by thread: Word Document Object - CreateDate modify problem
- Next by thread: Re: ASP.NET + Excel Download
- Index(es):