Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ASP.NET Page Not Releasing COM Object
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00754450
Message ID:
00754532
Vues:
22
I'm not seeing the reference count *decrease* when it's in a COM+ server application, and IE only shows a blank page with the IE "world-ball" spinning. I have to close IE, restart IIS (which starts the GC I guess, my web site and virtual dir ASP.NET app are both set to run in-process with IIS) in otder to get content again.

I'll do whatever it takes to not show users a blank screen and make them (and me) restart everything. What did I miss?



>Hi Steve,
>
>The reason why you don't see the reference count increase is because the garbage collection hasn't kicked in yet to release the reference to the COM object. Even though you set the reference to null, the object still is not destroyed until the garbage collection comes through and clears out objects no longer referenced. If .NET needs to call COM, then a RCW (Runtime Callable Wrapper) is generated. A RCW is a wrapper for COM objects that's callable by the runtime. It's created on the garbage collection heap, and so is subject to the runtime's garbage collection, which is what all runtime objects expect, and it also maintains an internal reference count for the COM object the managed object is calling. The GC keeps track of the number of references that an object has, and when that object is no longer referenced, it flags it for garbage collection.
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform