This is a subtle problem. In your original code you created an intermediate ref 
with getParent and the refcount of "foo1" got incremented accordingly. But the 
intermediate ref is not maintained, so no decrementation happens afterwards. 
Solution 1: The `lent` annotation prohibits the update of the refcounter. 
Solution 2 : With introduction of an additional variable, decrementation 
happens when the variable leaves the scope. That works. It is expensive though. 
So, i would prefer the `lent` annotation.

Reply via email to