bigdataviewer / bigdataviewer-core

ImgLib2-based viewer for registered SPIM stacks and more
BSD 2-Clause "Simplified" License
33 stars 35 forks source link

Important: Fix memory leak #105

Closed maarzt closed 4 years ago

maarzt commented 4 years ago

ClassCopyProvider is used to create RealARGBColorConverter. Unfortunately an imglib2 pixel is used as the key. ClassCopyProvider keeps the key (imglib2 pixel) in memory. The pixel holds a reference to the image. Hence prevents the image from being garbage collected.

This can prevent many images shown in BDV from being garbage collected. As every new pixel value is a new key, and will kept.

tpietzsch commented 4 years ago

thanks!