Skip to content
Snippets Groups Projects
Commit 10eb9aa1 authored by Matthias Arzt's avatar Matthias Arzt
Browse files

RealARGBColorConverter: fix memory leak when calling ClassCopyProvider

This line causes BDV to keep a reference to the first (or more) images
shown. ClassCopyProvider keeps the keys used for creating class copies.
In the key was a ImgLib2 pixel. So class copy kept a reference to the
pixel. The pixel kept a reference to it's image, which than never gets
garbage collected.
parent 61094aeb
Branches
No related tags found
No related merge requests found
......@@ -57,7 +57,7 @@ class Instances
provider = new ClassCopyProvider<>( Imp.class, RealARGBColorConverter.class, double.class, double.class );
}
}
return provider.newInstanceForKey( type, min, max );
return provider.newInstanceForKey( type.getClass(), min, max );
}
public static class Imp< R extends RealType< ? > > implements RealARGBColorConverter< R >
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment