TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Richard Blythe
NA
101
0
FileStream error. ????
Jul 6 2007 3:07 PM
I have written a class that stores user options throughout the program. (Color preferences, startup windows, etc.) When the program initializes, a FileStream object is used to open then file then a binary formatter is used to deserialize the stream. The FileStream is then closed.
The problem is that when the program closes and the FileStream object trys to open the file to save the updated user options. A file exception is
sometimes
threw: "Cannot access file because it is being used by another proccess". Whats so annoying about the error is that it only happens SOMETIMES! A debugging nightmare! I assume that the object handle is not being released somewhere in memory. Can anybody give me any pointers on overcoming this problem?
Reply
Answers (
2
)
How to disable JavaScript in WebBrowser?
Accessing Right-Click Menu in Process Information