Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Another approach than File.Delete(tcFile)
Message
From
30/05/2012 18:51:40
 
 
To
30/05/2012 18:33:35
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:
01544874
Views:
28
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform