[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: The dofile does not unlock the file until GC
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 3 Aug 2006 15:35:34 -0300
> The call to os.remove() fails, reporting the file is locked by
> someprocess. If I add call to collectgarbage("collect") on line (*),
> os.remove() succeeds. Looks like dofile() keeps file open until GC.
This is very strange. dofile never creates any Lua object for the file.
Also, luaL_loadfile take pains to always close the file.
Are you sure the files are not open by some other process?o
Could you please post the actual code that has the problem (ideally the
minimal example that exhibits the problem)?
--lhf