Skip to content
Snippets Groups Projects
Commit bf8609c8 authored by Matthias Arzt's avatar Matthias Arzt Committed by tpietzsch
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 0b89db79
No related branches found
No related tags found
No related merge requests found
...@@ -57,7 +57,7 @@ class Instances ...@@ -57,7 +57,7 @@ class Instances
provider = new ClassCopyProvider<>( Imp.class, RealARGBColorConverter.class, double.class, double.class ); 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 > 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