Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Another approach than File.Delete(tcFile)
Message
From
30/05/2012 20:25:23
 
 
To
30/05/2012 18:51:40
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01544721
Message ID:
01544880
Views:
20
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform