This fixes a future usability issue where its easy to create a
lambda which ends up referencing a high-level struct's owning class
and then have the high-level struct hold a global reference to the
lambda, creating a reference cycle that java can't see into.
instead, we require the user hold a reference to the lambda as
long as the parent exists, something which we can automate on the
java bindings end.