Browse Source

Use weak image ref for ImageBinder

onevcat 5 years ago
parent
commit
7de87c1a82
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Sources/SwiftUI/ImageBinder.swift

+ 1 - 1
Sources/SwiftUI/ImageBinder.swift

@@ -48,7 +48,7 @@ extension KFImage {
 
         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.")
         init(source: Source?, options: KingfisherOptionsInfo? = nil, isLoaded: Binding<Bool>) {