Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Another approach than File.Delete(tcFile)
Message
De
30/05/2012 20:25:23
 
 
À
30/05/2012 18:51:40
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:
01544880
Vues:
21
>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.

Thanks for the info

>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.

Good one, I am using it in the Data class but didn't think of using it in the Process class, which is greatly welcome because this one processes DOS utility and other types of programs so this will be safer.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform