<div dir="ltr">Hi,<div><br></div><div><div>I use the canvas_open() function to locate a file (FAUST DSP file) but I don't understand if I should use the close() function on the returning value:</div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><font face="arial, helvetica, sans-serif"><br></font></div></div></blockquote><span style="font-family:arial,helvetica,sans-serif">int fd = canvas_open(...);</span><br><span style="font-family:arial,helvetica,sans-serif">if(fd >= 0)</span><br><span style="font-family:arial,helvetica,sans-serif">{</span><br><span style="font-family:arial,helvetica,sans-serif">    close(fd);</span><br><div><div><font face="arial, helvetica, sans-serif">}</font></div></div><div><div><br></div><div>This code works well on Linux and Mac but it crashes on Windows. I looked at other uses of the canvas_open() function but they differ. The close() function is used, in the binbuf_read_via_canvas() function (l. 850 of m_binbuf.c) or in the open_soundfile_via_canvas() function (l. 494 of d_soundfile.c). But the returning value is not closed in the bonk_read() function (l. 985 of bonk~.c) or the garray_read() function (l. 1096 of g_array.c). </div><div><br></div><div>Is there one case where I should call the close() function and another not. Or is there an error in some of these example? Am I missing something important?</div><div><br></div><div>Thanks</div></div></div>