Who should be responsible for closing a stream

前端 未结 3 1266
后悔当初
后悔当初 2021-02-14 13:38

I\'m writing an application that creates a \"Catalog\" of files, which can be attributed with other meta data files such as attachments and thumbnails.

I\'m trying to ab

3条回答
  •  北恋
    北恋 (楼主)
    2021-02-14 13:48

    In effect the last object to use the stream should be responsible for closing it, and that is generally the caller.

    Enjoy!

提交回复
热议问题