Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Another approach than File.Delete(tcFile)
Message
De
30/05/2012 18:51:40
 
 
À
30/05/2012 18:33:35
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01544721
Message ID:
01544874
Vues:
29
The close is necessary if you want to free up the resources right away. Without it, the process' resources are retained until the garbage collector kicks in. The close will force them to be released immediately.

Even better than using the close though would be to put the process in a using block (http://msdn.microsoft.com/en-us/library/htd05whh%28VS.80%29.aspx). That will ensure that its resources are released even if there is an error that prevents it from reaching the close and will handle the close for you.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform