Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
.Dispose
Message
De
21/03/2006 12:32:18
 
 
À
21/03/2006 11:27:07
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Divers
Thread ID:
01106252
Message ID:
01106283
Vues:
23
You shouldn't need to ever call .Dispose(), unless you're calling unmanaged code, as .Net handles garbage collection for you. Calling .Dispose() too often can cause performance problems.

I'm working my way through this book http://www.amazon.com/gp/product/1590594193/sr=8-1/qid=1142962272/ref=pd_bbs_1/103-4786778-9535042?%5Fencoding=UTF8

It's helped my understanding of how .Net works and explains garbage collection.



>I haven't received any formal training with .NET. Since I am mostly self-taught, there are quite a few things I do just because I read somewhere I need to do them, and not understanding why.
>
>One of these is the .Dispose routine. Do I need to be calling this, and if so for what? When I declare certain things like datasets, forms, and other objects I just check to see if I can dispose of them, and if I can then I do.
>
>I understand the concept of Garbage Collection for the most part, so shouldn't that be enough?
>
>I would appreciate any advice!
>
>Thanks,
>Mike
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform