Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
End of 2001?
Message
 
 
À
01/04/2001 07:06:27
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Divers
Thread ID:
00490436
Message ID:
00490966
Vues:
10
>>Yes, C# is the only language in Visual Studio.NET to fully cater for the CLR including all the exposed types. Beta 2 will apparently expose a lot more functionality including a solution to the non-deterministic destructor thing.
>
>What is a non-deterministic destructor thing?

PMFJI, but I believe it has to with how CLR destroys it's objects. When you create a COM object, an internal call is made to the internal method AddRef(). A counter is incremented when you intially create the object and each time it is assigned to a variable. Ex.

ox = createobject('myobject')
oy = ox

The internal count is 2. When you release oy the count is decremented and so on. When the last reference to the object is released, the destructor is initiated and the object finally goes away. With VFP and VB (currently), the destructor fires immediately upon the last object reference going away.

With .NET that doesn't happen. A background garbage collection thread continually runs and checks object references. If it finds that the internal count is 0, it initiates the destructor. Depending on the priority of the garbage collectino thread and the use of the object, resources it holds could still be in use after all objects have been released and it could lead you into problems.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform