Have AbstractGridCoverageWriter release both output stream and destination on dispose()

Description

Seems the OOMs we are seeing in GeoServer WCS tests are due to the writers keeping a hold on the destination and output stream objects, which in GeoServer happen to keep a 50KB buffer (partial buffer output stream strategy). Writers accumulate on the finalizer queue and those 50kb pile up... better release the object references on dispose() instead. (we could also just get rid of the finalizer, but that might have broader consequences....)

Environment

None

Status

Assignee

Andrea Aime

Reporter

Andrea Aime

Triage

None

Components

Fix versions

Priority

Medium
Configure