Fix: DEM ZipFile-s not being closed by Sublimis · Pull Request #1577 · mapsforge/mapsforge

@Sublimis

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.

@Sublimis

devemux86

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.

@Sublimis

* Rename fields to match used convention

devemux86

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.

@Sublimis

@devemux86