Hello,
The following document should describe how assemblies are located:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconassemblies.asp. This should provide you with information as to how
types are resolved.
As for object instantiation, assemblies contain enough information (or
metadata) to fully describe their layout. As a result, the runtime is fully
responsible for allocating and initializing type instantiations based on
type resolution and constructor signatures.
Because of the runtime's garbage collection mechanism, AddRef and Release
are no longer necessary in managed code (barring COM interop, of course).
Cheers,
Simon
--------------------
>Content-Class: urn:content-classes:message
>From: "Hanuman" <dhaeseler@ozcap.com>
[quoted text clipped - 44 lines]
>
>Thank you for your input!

Signature
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
Hanuman - 07 Jul 2003 23:27 GMT
Thank you!
>-----Original Message-----
>Hello,
[quoted text clipped - 64 lines]
>>
>>Thank you for your input!
Calvin - 08 Jul 2003 19:58 GMT
>As for object instantiation, assemblies contain enough information (or
>metadata) to fully describe their layout. As a result, the runtime is fully
>responsible for allocating and initializing type instantiations based on
>type resolution and constructor signatures.
But I've seen something different when you try to
instantiate an object derived from ContextBoundObject.
I used debug to monitor the process. When you call new a
ContextBoundObject
===============
Class A : ContextBoundObject
{
}
A a = new A();
===============
You won't get an object of type A, you will get
__TransparentProxy instead.
a.GetType() is not available at the watch window, but in
local variable window, you will see it's type of
__TransparentProxy.
But if you say:
Type T = a.GetType(); in your code, use your debugger, you
will see T is typeof(A).
It's just weird, I am not sure how the runtime process the
ContextBoundObject.
Calvin
Simon Hall [MSFT] - 30 Sep 2003 01:49 GMT
Calvin,
__TransparentProxy is an internal CLR type used for context bound and
remoted objects. This type often wraps the true type. The debugger only
exposes types and fields, which means that it is not smart enough to unwrap
the object to show you the true type. For a *much* more detailed
explanation of these internal types, please see Chris Brumme's blog entry
on this subject:
http://blogs.gotdotnet.com/cbrumme/PermaLink.aspx/24e9e5f5-9923-4cf9-b097-9c
018c69d5cb
Cheers,
Simon
--------------------
>Content-Class: urn:content-classes:message
>From: "Calvin" <szguoxz@hotmail.com>
>Sender: "Calvin" <szguoxz@hotmail.com>
>References: <0a1a01c3448a$7477a6c0$a101280a@phx.gbl>
<u6uG$WNRDHA.2012@cpmsftngxa09.phx.gbl>
>Subject: RE: Object Instantiation
>Date: Tue, 8 Jul 2003 11:58:22 -0700
[quoted text clipped - 50 lines]
>
>Calvin