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.
ClassCopyProvider
is used to createRealARGBColorConverter
. 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.