icerockdev / moko-widgets

Multiplatform UI DSL with screen management in common code for mobile (android & ios) Kotlin Multiplatform development
https://moko.icerock.dev
Apache License 2.0
384 stars 31 forks source link

Fix iOS background update performance issues #293

Closed stevesoltys closed 3 years ago

stevesoltys commented 3 years ago

This avoids the memory leak / high CPU usage from an indefinite number of CADisplayLink being added to NSRunLoop.currentRunLoop.

It does this by removing the CADisplayLink from the loop when the UIView is offscreen (window is null).

Alex009 commented 3 years ago

@stevesoltys thanks! but current version of moko-widgets depends on bintray versions...i merge it, but can't publish