Sfoglia il codice sorgente

Use weak image ref for ImageBinder

onevcat 5 anni fa
parent
commit
7de87c1a82
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      Sources/SwiftUI/ImageBinder.swift

+ 1 - 1
Sources/SwiftUI/ImageBinder.swift

@@ -48,7 +48,7 @@ extension KFImage {
 
 
         var isLoaded: Binding<Bool>
         var isLoaded: Binding<Bool>
 
 
-        var loadedImage: KFCrossPlatformImage? = nil
+        weak var loadedImage: KFCrossPlatformImage? = nil
 
 
         @available(*, deprecated, message: "The `options` version is deprecated And will be removed soon.")
         @available(*, deprecated, message: "The `options` version is deprecated And will be removed soon.")
         init(source: Source?, options: KingfisherOptionsInfo? = nil, isLoaded: Binding<Bool>) {
         init(source: Source?, options: KingfisherOptionsInfo? = nil, isLoaded: Binding<Bool>) {