forked from floraachy/ImageKnife
!235 修复占位图、错误图、重试图从内存获取之后进入子线程导致内存泄露
Merge pull request !235 from zgf/master
This commit is contained in:
commit
98145712fa
|
@ -1,6 +1,8 @@
|
|||
## 2.2.0-rc.2
|
||||
- ImageKnife支持heic图片修改demo,按钮控制组件是否展示
|
||||
- ImageKnife控制可视化区域图片
|
||||
- 修复占位图、错误图、重试图从内存获取之后进入子线程导致内存泄露
|
||||
- ImageKnifeComponent组件key属性改为id属性
|
||||
|
||||
## 2.2.0-rc.1
|
||||
- 修改ImageKnife跳过网络,点击默认,图片没有传入宽高,无显示bug
|
||||
|
|
|
@ -612,15 +612,15 @@ export class ImageKnife {
|
|||
let retryholderCache = this.memoryCacheProxy.loadMemoryCache(request.retryholderCacheKey, request.isCacheable);
|
||||
let errorholderCacheKey = this.memoryCacheProxy.loadMemoryCache(request.errorholderCacheKey, request.isCacheable);
|
||||
|
||||
if (usageType == Constants.PLACE_HOLDER && placeholderCache && !mainCache && !retryholderCache && !errorholderCacheKey) {
|
||||
if (usageType == Constants.PLACE_HOLDER && placeholderCache) {
|
||||
LogUtil.info("imageknife load placeholder from MemoryCache")
|
||||
request.placeholderOnComplete(placeholderCache);
|
||||
return;
|
||||
} else if (usageType == Constants.RETRY_HOLDER && retryholderCache && !mainCache && !errorholderCacheKey) {
|
||||
} else if (usageType == Constants.RETRY_HOLDER && retryholderCache) {
|
||||
LogUtil.info("imageknife load retryholder from MemoryCache")
|
||||
request.retryholderOnComplete(retryholderCache);
|
||||
return;
|
||||
} else if (usageType == Constants.ERROR_HOLDER && errorholderCacheKey && !mainCache) {
|
||||
} else if (usageType == Constants.ERROR_HOLDER && errorholderCacheKey) {
|
||||
LogUtil.info("imageknife load errorholder from MemoryCache")
|
||||
request.errorholderOnComplete(errorholderCacheKey);
|
||||
return;
|
||||
|
|
|
@ -119,7 +119,7 @@ export struct ImageKnifeComponent {
|
|||
|
||||
build() {
|
||||
Canvas(this.context)
|
||||
.key(this.keyCanvas.keyId)
|
||||
.id(this.keyCanvas.keyId)
|
||||
.width((this.imageKnifeOption!=undefined && this.imageKnifeOption.mainScaleType!= undefined && this.imageKnifeOption.mainScaleType == ScaleType.AUTO_WIDTH )? this.currentSize.width:'100%')
|
||||
.height((this.imageKnifeOption!=undefined && this.imageKnifeOption.mainScaleType!= undefined && this.imageKnifeOption.mainScaleType == ScaleType.AUTO_HEIGHT )? this.currentSize.height:'100%')
|
||||
.renderFit(RenderFit.RESIZE_FILL)
|
||||
|
|
Loading…
Reference in New Issue