--

The initializer function will not be inlined because the ViewLifecycleLazy class is not an inline class. If you declare the helper function inline or not, in both cases the compiler still needs to generate one class for each initializer lambda in your app.

The only difference is that you'll have one less function in your app if you declare it inline, and the function call will be replaced by the body of the function.

--

--

Christophe Beyls
Christophe Beyls

Written by Christophe Beyls

Android developer from Belgium, blogging about advanced programming topics.

No responses yet