>-----Original Message-----
>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>
>>Sender: "Hanuman" <dhaeseler@ozcap.com>
>>Subject: Object Instantiation
>>Date: Mon, 7 Jul 2003 06:19:54 -0700
>>Lines: 28
>>Message-ID: <0a1a01c3448a$7477a6c0$a101280a@phx.gbl>
>>MIME-Version: 1.0
>>Content-Type: text/plain;
>> charset="iso-8859-1"
>>Content-Transfer-Encoding: 7bit
>>X-Newsreader: Microsoft CDO for Windows 2000
>>Thread-Index: AcNEinR3GAGVf2WcQYWqeXtumziFZA==
>>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>>Newsgroups: microsoft.public.dotnet.framework.clr
>>Path: cpmsftngxa09.phx.gbl
>>Xref: cpmsftngxa09.phx.gbl
microsoft.public.dotnet.framework.clr:1351
>>NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
>>X-Tomcat-NG: microsoft.public.dotnet.framework.clr
>>
>>I'm trying to understand the details of calling "New" on
a
>>managed object.
>>
>>In the COM world, calling "New" caused the following
>>superset of events:
>>1. The SCM resolves the path to the class in the
registry
>>by using its CLSID.
>>2. The object's class factory creates its instance in
>>memory, and the instance's pointer is returned to the
>>client by the SCM.
>>3. The client calls the IUnKnown AddRef() method on the
>>object to increment its internal reference count.
>>
>>As far as I've been able to determine, the following
>>events occur when you call "New" on a managed object:
>>1. The .Net runtime looks for the requested assembly by
>>querying the GAC first, then any CodeBase entries in
>>the .config file, and finally by probing.
>>2. The Garbage Collector allocates space in the managed
>>heap for an instance of the object.
>>3. The runtime creates an instance of the object
>>
>>Questions:
>>1. Am I missing any steps?
>>2. COM objects provide class factories for
instantiation.
>>How does the .Net runtime create object instances?
>>
>>Thank you for your input!
>>
>
>
>--
>
>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.
>
>.