diff options
author | Colin Snover | 2017-05-13 22:07:53 -0500 |
---|---|---|
committer | Colin Snover | 2017-05-13 22:46:25 -0500 |
commit | f44d8b6da69a1444c76fcbce28a834f2368ddf35 (patch) | |
tree | ef2738c6e48a2b048e1b6e48a61d53ed4bec9664 /engines/cruise/actor.cpp | |
parent | 1911b19e154b4e946d29dbf143b18cb6c9e4b660 (diff) | |
download | scummvm-rg350-f44d8b6da69a1444c76fcbce28a834f2368ddf35.tar.gz scummvm-rg350-f44d8b6da69a1444c76fcbce28a834f2368ddf35.tar.bz2 scummvm-rg350-f44d8b6da69a1444c76fcbce28a834f2368ddf35.zip |
SCI: Dispose uncached volume file streams
The stream returned by a call to ResourceManager::getVolumeFile
either MUST (when returning an I/O stream from a Common::FSNode)
or must NOT (when returning a Common::File *) be deleted by the
caller, depending upon some internal implementation details of
ResourceSource that should never have been exposed to callers.
FSNode streams that should have been deleted were not being
deleted all the time, which leaked and eventually caused ScummVM
to run out of FDs.
This commit improves this situation by shielding callers from
these internal details by centralizing the destruction logic in
one place, so FSNode read streams stop being leaked and callers
no longer need to know stuff about the internals of the
ResourceSource they are trying to read in order to avoid leaking
or breaking the volume file cache.
Fixes Trac#9782.
Diffstat (limited to 'engines/cruise/actor.cpp')
0 files changed, 0 insertions, 0 deletions