You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code is of bugs and nasty. It is not written by me, not by my colleague.
Now I am in charge of the bugs.
Reading from then, it is very easy.
I have a crash question, And I asked in [StackOverFlow](iOS Crash, memory management error when using NSObject+Rx and Then?)
The object just set its properties in the closure. It does not visit other properties. So it is very ARC, it will not interfere other objects' memory management.
While my colleague's code is not of Then, it did two much.
/// a unique DisposeBag that is related to the Reactive.Base instance only for Reference type
public var disposeBag: DisposeBag {
get {
return synchronizedBag {
if let disposeObject = objc_getAssociatedObject(base, &disposeBagContext) as? DisposeBag {
return disposeObject
}
let disposeObject = DisposeBag()
objc_setAssociatedObject(base, &disposeBagContext, disposeObject, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
return disposeObject
}
}
Reading from the source code of NSObject+Rx, in the scene above ,I think rx.disposeBag is equal to label.rx.disposeBag.
It may cause bugs.
RxSwift's source code is a little hard to read.
So what is the crash reason?
The text was updated successfully, but these errors were encountered:
rx.disposeBag will never equal label.rx.disposeBag. If your code is crashing here and you suspect the use of Then, try removing it. The compiler will give you different diagnostic messages when used outside a closure used by Then.
If I had to guess, I would investigate the tap gesture recognizer firing when you don't expect it. I would try something like this:
iOS Crash, I think it is caused by memory management error when using third party library NSObject+Rx and Then?
Could you give me some tips?
Firebase crashlytics reports,
Here is the code:
The code is of bugs and nasty. It is not written by me, not by my colleague.
Now I am in charge of the bugs.
Reading from then, it is very easy.
I have a crash question, And I asked in [StackOverFlow](iOS Crash, memory management error when using NSObject+Rx and Then?)
The object just set its properties in the closure. It does not visit other properties. So it is very ARC, it will not interfere other objects' memory management.
While my colleague's code is not of Then, it did two much.
I think the crash is caused by NSObject+Rx.
NSObject+Rx's code is easy, just code sugar.
Reading from the source code of NSObject+Rx, in the scene above ,I think
rx.disposeBag
is equal tolabel.rx.disposeBag
.It may cause bugs.
RxSwift's source code is a little hard to read.
So what is the crash reason?
The text was updated successfully, but these errors were encountered: