Fix: DEM ZipFile-s not being closed by Sublimis · Pull Request #1577 · mapsforge/mapsforge
This caused a memory leak observed on desktop (wasn't tested on Android). The leak becomes apparent when many HGT files are used for hill shading.
| protected final ZipEntry zipEntry; | ||
| protected final File mFile; | ||
| protected final String mZipEntryName; | ||
| protected final long mZipEntrySize; |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Sublimis Please do not use the m field naming, as we do not use it in Mapsforge.
It also overloads the commit history with unrelated changes in the pull request.
| protected final long zipEntrySize; | ||
|
|
||
| public DemFileZipEntryFS(ZipFile zipFile, ZipEntry zipEntry) { | ||
| public DemFileZipEntryFS(File zipFile, String zipEntry, long zipEntrySize) { |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zipEntry better be named zipEntryName to be the same as the class field.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters