http://bugs.winehq.org/show_bug.cgi?id=4436
------- Additional Comments From mike@codeweavers.com 2006-15-02 05:58 -------
a badly-written app surely would not try to access the stream after it had called the destructor for the storage object? If this is the case, then deleting the stream will stop the memory leak.
There's probably applications around that do IStorage_Release followed by IStream_Release rather than the other way around. If the app leaks memory on Windows, the best we can do on Wine is to also leak memory.
It does not make sense that one can open a stream STGM_READWRITE within an object opened with STGM_READ, but you can on Windows!
It may have to do with the STGM_TRANSACTED flag that the storage is opened with. Perhaps OLE storage allows you to write to a stream in that case, but will refuse to commit it back to the storage?
Unfortunately STGM_TRANSACTED is sorely missing in our OLE Storage implementation...