Wrox Programmer Forums
|
Visual Basic 2008 Essentials If you are new to Visual Basic programming with version 2008, this is the place to start your questions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Basic 2008 Essentials section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 14th, 2009, 08:02 PM
Friend of Wrox
 
Join Date: Jun 2005
Posts: 244
Thanks: 3
Thanked 4 Times in 4 Posts
Default IO Disposing

Hi all,

When using the:
Code:
IO.Directory.CreateDirectory("C:\Temp")
To create the Temp directory, you can't add another line below accessing he directory because the IO.Directory.CreateDirectory hasn't released the resources!

Same with geting directory listings and stuff.

See when I search a removable medium for files and right after its done I want to safely remove my drive it can't because its still in use, so when i close my form down, then it will allow me to remove the device. This is because when my form is shutdown it releases all resources being used, so how do i do that in my program!

Cheers
__________________
Apocolypse2005, I'm a programmer - of sorts.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Importants of disposing of objects Apocolypse2005 Pro Visual Basic 2005 3 March 11th, 2009 11:25 AM
Disposing / Releasing objects yamyam C# 5 February 17th, 2006 04:06 AM
Correctly disposing dynamically created controls simarik C# 2 December 20th, 2005 08:49 PM
Disposing a WinForm in Excel Bowmangotti VB.NET 2002/2003 Basics 0 October 5th, 2004 10:13 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.