[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Stacked resources (streams, files) && resource ownership

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2005-12-12 02:08:21 CET

On consideration, here is where I would like us to be:

  * Streams which read from or write to an underlying object own that
object, i.e. closing the stream closes the underlying object, if
applicable.

  * The layer (function or data type) which created a stream is
responsible for closing it, except when the above rule applies.

  * Window handlers are thought of as an odd kind of stream, and passing
the final NULL window is considered closing the stream.

If you think of apply_textdelta as creating a window handler, then I
don't think we're too far off. svn_stream_from_aprfile isn't owning its
subsidiary file, svn_txdelta_apply is erroneously taking responsibility
for closing the window stream it is passed, and there may be some other
deviations.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Dec 12 02:09:32 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.