[osg-users] Releasing file handles in osgDB

Antoine Hue tonio_73 at tiscali.fr
Sun Sep 30 11:37:31 PDT 2007


Hello,

I want to overwrite a .osga file from a child process while the same 
file is shown in the main process's viewer.
At the beginning I did it brutal: rewrite the file without checking. It 
worked OK for Linux but was crashing on Windows in case of LODed scene 
graph within the .osga. I have added a temporary/shadow file and it 
works still  under Linux but not under Windows. The only case it works 
is when the file does not already exist. I suspect that Windows file 
protection is sticking again: "Cannot delete file XXX since it is used 
by another application.".

I have removed (many frames ahead) the top node from the scene graph of 
the main viewer but still cannot overwrite the file.

Is there a way to check or force that osgDB is releasing completely the 
file handle ?

Thanks in advance,

Antoine



More information about the osg-users mailing list