RxSwiftCommunity / RxAnimated

Animated RxCocoa bindings
MIT License
687 stars 38 forks source link

Memory leak #48

Open StefaniOSApps opened 2 years ago

StefaniOSApps commented 2 years ago

Hi, I used v0.9.0 with RxSwift 6.2 on latest xCode.

i have a memory leak by using:

Observable
   .combineLatest(
      foo1.asObservable(),
      foo2.asObservable()
   )
   .map { string in
      NSMutableAttributedString(string: string)
   }
   .bind(to: rx.animated.fade(duration: 0.1).attributedText)
   .disposed(by: bag)

I can solve this leak with:

Observable
   .combineLatest(
      foo1.asObservable(),
      foo2.asObservable()
   )
   .map { string in
      NSMutableAttributedString(string: string)
   }
   .bind(to: rx.attributedText)
   .disposed(by: bag)

how do you think?