comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: IDL doesn't close files.
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: IDL doesn't close files. [message #38987 is a reply to message #38985] Thu, 15 April 2004 16:07 Go to previous messageGo to previous message
R.G. Stockwell is currently offline  R.G. Stockwell
Messages: 363
Registered: July 1999
Senior Member
> wl wrote:
>> I create a text file in IDL using openw, write some text to it, then
>> close it using
>> close, u, /force
>> free_lun, u, /force
>>
>> Then, when I try to open it in a text editor (I use the FAR manager's
>> internal editor) it says that is unable to open it because of sharing
>> violation.
>>
>> What should I do to close just created file without exiting IDL?


Do NOT close then use free_lun.
If you used a get_lun, then use free_lun.
i.e.


OPENW, U, 'file.dat', /GET_LUN
writeu,U, 1.0
free_lun,U



That is what is causing your leak (probably).

Cheers,
bob
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Transparent polygons
Next Topic: need to develop interactive plot routine

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 17:54:28 PDT 2025

Total time taken to generate the page: 0.15657 seconds