Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to release object stored in property?
Message
 
 
À
01/05/2009 11:08:37
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01397173
Message ID:
01397431
Vues:
33
>>Hi,
>>I initialize object to private vairable via
>>
>>public class MyBase
>>{
>>private MyClass _myClass = new MyClass();
>>}
>>
>>I found that it caused memory leak as it is not released. May I know how should I release it once myBase is released?
>>
>>Thank you
>
>Take a look at these references
>
>http://www.bluebytesoftware.com/blog/PermaLink.aspx?guid=88e62cdf-5919-4ac7-bc33-20c06ae539ae
>http://lyontamers.com/blogs/jimlyon/archive/2008/08/29/garbage-collection-finalizers-and-dispose-what-every-c-programmer-should-know.aspx

Good article (I checked the second one), thanks.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform