From 7290d1b18c82511b2e3b9339100e882c3e1fc8b5 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 19 Feb 2007 21:11:13 +0000 Subject: Enhance (Seekable)SubReadStream so be able to (optionally) dispose the parent stream after it's been used (simplifies memory management for client code) svn-id: r25732 --- common/stream.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common/stream.cpp') diff --git a/common/stream.cpp b/common/stream.cpp index afc21ebca2..3926fc30f6 100644 --- a/common/stream.cpp +++ b/common/stream.cpp @@ -128,8 +128,8 @@ uint32 SubReadStream::read(void *dataPtr, uint32 dataSize) { return dataSize; } -SeekableSubReadStream::SeekableSubReadStream(SeekableReadStream *parentStream, uint32 begin, uint32 end) - : SubReadStream(parentStream, end), +SeekableSubReadStream::SeekableSubReadStream(SeekableReadStream *parentStream, uint32 begin, uint32 end, bool disposeParentStream) + : SubReadStream(parentStream, end, disposeParentStream), _parentStream(parentStream), _begin(begin) { assert(_begin <= _end); -- cgit v1.2.3