Recently, in the context of BigStitcher-Spark, I worked on prefetching Cells of a cached CellImg from S3. The idea is to touch a pixel (Type) from each Cell. We then want to hold on to those Types, so that the Cell is not GCed.
The question is whether that is actually sufficient to hold on to the Type. What do we actually need to hold a strong reference to? The Type, the Sampler, or the Cell?
Recently, in the context of BigStitcher-Spark, I worked on prefetching
Cell
s of a cachedCellImg
from S3. The idea is to touch a pixel (Type
) from eachCell
. We then want to hold on to thoseType
s, so that theCell
is not GCed.The question is whether that is actually sufficient to hold on to the
Type
. What do we actually need to hold a strong reference to? TheType
, theSampler
, or theCell
?This should be documented somewhere!