Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #4829
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!aioe.org!.POSTED!not-for-mail |
|---|---|
| From | Kaz Kylheku <kaz@kylheku.com> |
| Newsgroups | comp.programming |
| Subject | Re: c# .net 4 unable to move file - file in use by another process (by itself) |
| Date | Thu, 16 Oct 2014 15:41:48 +0000 (UTC) |
| Organization | Aioe.org NNTP Server |
| Lines | 16 |
| Message-ID | <20141016083723.39@kylheku.com> (permalink) |
| References | <4c284fb9-3878-43e0-9d11-85b7c33ce269@googlegroups.com> |
| NNTP-Posting-Host | X+c6YNb3AaWMPA3YfA4opg.user.speranza.aioe.org |
| X-Complaints-To | abuse@aioe.org |
| User-Agent | slrn/pre1.0.0-18 (Linux) |
| X-Notice | Filtered by postfilter v. 0.8.2 |
| Xref | csiph.com comp.programming:4829 |
Show key headers only | View raw
On 2014-10-16, lachlann@gmail.com <lachlann@gmail.com> wrote: > When i attempt to rename the file from .pending -> .failed i get an error > "file is in use by another process". originally this service was > multi-threaded so i assumed it was a collision with other threads however > upon further investigation i've made it single-threaded and it is still > failing. it even happens when stepping through the code using the debugger > (VS2010). > > I've moved all "file" logic into 3 methods: > readfromfile > writetofile > movefile Who closes the handle to release the file? Is it possible that you might be leaving that responsibility to a finalization performed by the garbage collector?
Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
c# .net 4 unable to move file - file in use by another process (by itself) lachlann@gmail.com - 2014-10-16 08:08 -0700
Re: c# .net 4 unable to move file - file in use by another process (by itself) Kaz Kylheku <kaz@kylheku.com> - 2014-10-16 15:41 +0000
Re: c# .net 4 unable to move file - file in use by another process (by itself) lachlann@gmail.com - 2014-10-16 12:59 -0700
Re: c# .net 4 unable to move file - file in use by another process (by itself) Justin Marshall <lachlann@gmail.com> - 2015-03-24 12:12 -0700
Re: c# .net 4 unable to move file - file in use by another process (by itself) CarolHudson <CarolHudson0@yahoo.com> - 2015-04-22 21:05 +0200
Re: c# .net 4 unable to move file - file in use by another process (by itself) Queego <tonyhecht@gmail.com> - 2015-08-14 19:14 -0500
csiph-web