wongkoo
wongkoo
这种情况建议将`renderingType`换成`renderingTypeExternal`
https://github.com/alibaba/power_image/blob/a86dee86624463114b1eb256ede023ea4f57b7f5/ios/Classes/PowerImagePlugin.m#L20-L29 每个 engine 都会更新 `[[PowerImageRequestManager sharedInstance] configWithTextureRegistry:registrar.textures];` 这里确实有问题
实际上在 2.5.3 上 ffi 性能已经跟 `texture` 不相上下了,晚些时候我会在仓库里补充对应的 benchmark。 而且 `ffi` 并不只是用于模拟器场景,比如 `texture` 较大尺寸的图片在安卓上可能会 crash:https://github.com/flutter/flutter/issues/92397 比如获取对应 `ui.Image` 等。 libpowerimage.so 仅占2KB左右。
推荐用 ffi,可以享受到 flutter Raster cache 带来的流畅度收益
It seems that the native cannot release the image memory due to hot restart, so the memory continues to increase, which eventually leads to OOM. This problem only occurs when...
> > It seems that the native cannot release the image memory due to hot restart, so the memory continues to increase, which eventually leads to OOM. > > This...
尝试把 renderingType 改成 renderingTypeExternal 试下
> iOS启动报错: > > ``` > /Users/zhangbing/github/bizhi_client/ios/Runner/AppDelegate.swift:18:48: Cannot find 'PowerImageNetworkImageLoader' in scope > > /Users/zhangbing/github/bizhi_client/ios/Runner/AppDelegate.swift:19:48: Cannot find 'PowerImageAssetsImageLoader' in scope > > /Users/zhangbing/github/bizhi_client/ios/Runner/AppDelegate.swift:20:48: Cannot find 'PowerImageFlutterAssertImageLoader' in scope > >...
请确认 README 中第一步 ImageCacheExt 是否有替换?