if I have the following: ```inline fun defaultChec...
# announcements
e
if I have the following:
Copy code
inline fun defaultCheck(result: VkResult) = result.check()

fun bar(check: (VkResult) -> Unit = ::defaultCheck) {
   check(..)
}
would there be any allocation regarding passing the lambda to
bar
?
d
Iirc, yes.
e
Where?
d
Depends on the platform, jdk7 would require the usual Java style anonymous class which can be cached if there are no captures. Jdk8 is a bit more complicated I think, with invoke dynamic. TL;DR lambdas that capture are not free.