readium / readium-sdk

A C++ ePub renderer SDK
BSD 3-Clause "New" or "Revised" License
383 stars 164 forks source link

AN-8945: Call reset() to delete ByteStream in ResourceStream #311

Closed ZakHsieh closed 6 years ago

ZakHsieh commented 6 years ago

Original implementation will cause huge memory leakages when Java layer acquire a resource, the ByteStream is never been released due to calling release() won't delete the memory allocation. I'd change the _ptr.release() to call deleter to free the memory.