openmicroscopy/openmicroscopy — pull request #1865 by mtbc (2013-12-04 17:01:48+00:00)
Title: assist #11675: prevent some leaking direct buffers

This PR attempts to help http://trac.openmicroscopy.org.uk/ome/ticket/11675 in promptly cleaning up native memory buffers without resorting to requesting that the system perform a full garbage collection. Various image-centric operations should be attempted -- view, import, project, etc. -- to look for any being broken. This is not a great solution, but there is no good solution.

In inspecting the code, make absolutely sure that a `PixelData` object upon which `dispose()` has been called is not subsequently accessed.

Leaked buffers will eventually be caught by garbage collection and finalization anyway, so this PR's coverage isn't complete. A clear present omission is `Plane2D`-related code.

Cc: @dpwrussell