W/unknown:CloseableReference﹕Finalized without closing in logcat
hi fresco, I have got logcat like this
W/unknown:CloseableReference﹕ Finalized without closing: 263cc769 30d915ee (type = NativePooledByteBuffer) W/unknown:CloseableReference﹕ Finalized without closing: 30c57b20 a595cd9 (type = NativePooledByteBuffer) W/unknown:CloseableReference﹕ Finalized without closing: b2cd69e 7afb57f (type = NativePooledByteBuffer) W/unknown:CloseableReference﹕ Finalized without closing: 2e57294c 679ed95 (type = NativePooledByteBuffer)
am I forget to do something?
You are probably not using closing the CloseableReference properly. Please refer to http://frescolib.org/docs/closeable-references.html#_ for the proper usage.
I edit my code like this, but still show me that logical, can anybody tell me how to fix it? @TarangS @daaku @natacado @benhiller @tageorgiou
ImageRequest imageRequest = ImageRequestBuilder.newBuilderWithSource(uri)
.setResizeOptions(new ResizeOptions(width, height))
.build();
ImagePipeline imagePipeline = Fresco.getImagePipeline();
final DataSource<CloseableReference
You dont need to use the Imagepipeline explicitly. SimpleDraweeView does it for you. Also if you use the SimpleDraweeView then you dont have to worry about closing the references as DraweeHierarchy in the SimpleDraweeView handles that.
In your code snippet, a ControllerListener is not required So effectively you only need to do:
Uri uri; DraweeController controller = Fresco.newDraweeControllerBuilder() .setUri(uri) .setAutoPlayAnimations(true) . // other setters .build(); mSimpleDraweeView.setController(controller);
For Understanding Drawee better read these, however you only need anything other than the above snippet for ur purpose. http://frescolib.org/docs/using-drawees-xml.html#_ http://frescolib.org/docs/using-drawees-code.html#_ http://frescolib.org/docs/animations.html#_ http://frescolib.org/docs/using-controllerbuilder.html#_
I am using SimpleDraweeView and if the code calls draweeView.setImageUri(Uri) multiple times, I get errors like this one
11-15 14:57:10.304 24258-24267/my.application W/unknown:CloseableReference﹕ Finalized without closing: 41fa4a40 420fa518 (type = CloseableStaticBitmap)
I'm reusing the drawee view in a recycler view, so this should be normal usage.
@Zhuinden confirmed, exactly the same behavior on a Galaxy Tab A (SM-T550), 5.0.2 and Nexus 5 2013 (6.0.1). Would be nice to know the reason.
I am code : Uri uri = Uri.fromFile(new File(path)); ImageRequestBuilder imageRequestBuilder = ImageRequestBuilder.newBuilderWithSource(uri) .setAutoRotateEnabled(true) .setResizeOptions(new ResizeOptions(mItemWidth, mItemWidth)); DraweeController controller = Fresco.newDraweeControllerBuilder() .setImageRequest(imageRequestBuilder.build()) .setOldController(holder.mImageView.getController()) .build(); holder.mImageView.setController(controller); has the same bug in gridview
is it fixed? i suffer from same bug at ver.0.12.0
The original cause here should be fixed. However, this also happens if you re-initialize Fresco (call Fresco.initialize(...)) more than once. I guess you're doing that according to your other issue (#1397).