--- On Mon, 2/28/11, Mathieu Bouchard <[email protected]> wrote:
> From: Mathieu Bouchard <[email protected]> > Subject: Re: [PD] Reading and writing binary files > To: "David" <[email protected]> > Cc: "pd-list" <[email protected]>, "Martin Peach" <[email protected]> > Date: Monday, February 28, 2011, 3:31 AM > On Sun, 27 Feb 2011, David wrote: > > > I have another question, though. How do the files get > closed? When you exit PureData? Does that mean that every > time you open a file, another system file handle is used and > not released until you exit PureData? Or is there some way > to explicitly close the file and release the file handle, > buffers, etc.? > > This depends on every object class. > > In the case of [binfile] [textfile] [qlist] [soundfiler], > the 'read' method copies the whole file to RAM and closes > immediately the filehandle. > > In the case of [#io.grid] ([#in grid]) and video readers, > there is 'open' > and there is 'close'. > > In [readsf~] it's slightly different, as 'stop' or '0' > implies closing, but it's not documented as such in Miller's > manual. The structure of 'open' followed by 'start'/'1' and > then 'stop'/'0' would suggest that there is a separate > 'close', and thus that after a stop you'd be able to resume > without reopening, but this is not the case. (!!!) > > GridFlow's 'load' in image readers is just a shortcut for > an 'open' 'bang' 'close' sequence. > > I think I remember that someone has found a filehandle leak > bug somewhere in Pd, but I don't recall what that was. > Anyone remembers ? Well, I know if I read a ca. 15mb file with [textfile], it takes about 10 seconds to load, then if I try to iterate through the file with [until] Pd will freeze. -Jonathan > > > _______________________________________________________________________ > | Mathieu Bouchard ---- tél: +1.514.383.3801 ---- > Villeray, Montréal, QC > > -----Inline Attachment Follows----- > > _______________________________________________ > [email protected] > mailing list > UNSUBSCRIBE and account-management -> > http://lists.puredata.info/listinfo/pd-list > _______________________________________________ [email protected] mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
