Re: How does managed code work?
- From: henk holterman <rentahacker@xxxxxxxxx>
- Date: Wed, 24 Jun 2009 00:11:26 +0200
Some good questions, I will answer a few:
Siegfried Heintze wrote:
(2) Can someone point me to a discussion of the managed heap?
Simply a heap for managed objects. The real issue is the Garbage collector.
(3) Why do we have non-determanistic destructors in C#?
The only possibility with a GC. But well written code will always use the explicit (deterministic) approach, and the GC/finalizer method is a safety net for situations that would be a resource-leak in an unmanaged language. The whole non-deterministic issue turns out to be largely theoretical.
A few points in favor of GC:
- automatic cleanup of all non-resource holding objects
- effective sharing of objects makes for much better OOP
- compacting means better use of Processor cache
(5) How is the structure of a managed DLL different from a native DLL?
It is strong-named and .NET allows side-by-side (different versions loaded at the same time).
(8) What is the difference between using PInvoke to manipulate a semephore or mutex and using System.Threading?
Most objects in System.Threading are wrapped Win32 semaphores (the P/Invoke already done). But Monitor is native .NET
-HH-
.
- References:
- How does managed code work?
- From: Siegfried Heintze
- How does managed code work?
- Prev by Date: Re: Move C# web app to another machine
- Next by Date: Re: Unique GUID for an asynchronous task
- Previous by thread: Re: How does managed code work?
- Next by thread: Re: How does managed code work?
- Index(es):