In the concrete scenario we have only two references and usually only one thread (the check is more or less to satisfy the compiler and for the unlikely case that it is actually null).
Do you mean that let
+ safe-call operator has actually zero memory overhead? Does callsInPlace(block, InvocationKind.EXACTLY_ONCE)
avoid NullPointException
without a local copy of the reference on the stack?
I agree with you that this is not a real world problem, but now I want to know