mirror of
https://github.com/ReactiveX/RxSwift.git
synced 2024-10-05 14:37:29 +03:00
Adds periodic resource printing to stdout.
This commit is contained in:
parent
32c2f49f6a
commit
e39648a84e
@ -81,6 +81,13 @@
|
||||
ReferencedContainer = "container:RxExample.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<EnvironmentVariables>
|
||||
<EnvironmentVariable
|
||||
key = "OS_ACTIVITY_MODE"
|
||||
value = "disable"
|
||||
isEnabled = "YES">
|
||||
</EnvironmentVariable>
|
||||
</EnvironmentVariables>
|
||||
<AdditionalOptions>
|
||||
<AdditionalOption
|
||||
key = "NSZombieEnabled"
|
||||
|
@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import RxSwift
|
||||
|
||||
@UIApplicationMain
|
||||
class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
@ -17,6 +18,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
if UIApplication.isInUITest {
|
||||
UIView.setAnimationsEnabled(false)
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
_ = Observable<Int>.interval(1, scheduler: MainScheduler.instance)
|
||||
.subscribe(onNext: { _ in
|
||||
print("Resource count \(RxSwift.Resources.total)")
|
||||
})
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user