RxSwift関連の総オブジェクト数出力
元ネタはこちらです。
http://qiita.com/ShingoFukuyama/items/20035171f9ec78efded7
RxSwift 3.0 version だとビルドできないようでしたので改めて記述しなおすと以下になります。
let timer = Timer(timeInterval: 3.0, target: BlockOperation.init(block: {
print("Resource count \(RxSwift.Resources.total)")
}), selector: #selector(Operation.main), userInfo: nil, repeats: true)
RunLoop.main.add(timer, forMode: .commonModes)
RxSwiftをデバッグビルドしていないと、RxSwift.Resources.total の定義が無いよ、と怒られてビルド失敗します。
Carthageを使っている場合は
carthage bootstrap RxSwift --configuration Debug
と、Debugをつけてビルドする必要がありちょっと面倒です。
Author And Source
この問題について(RxSwift関連の総オブジェクト数出力), 我々は、より多くの情報をここで見つけました https://qiita.com/BobZombie/items/8ea9d03c27bf122c1208著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .