The bug is that the destructor of an embedded shared object will not be called after the enclosing shared object is destroyed: 1. Create shared objects $xx and $yy. 2. Embed $yy inside $XX: $xx->{embedded} = $yy 3. Undef $yy. Its destructor is not called because it's still referenced by $xx. (This is as expected.) 4. Undef $xx. The destructor for $xx is called (as expected), but the destructor for $yy is not (bug). If the above is done with ordinary objects, the the destructors for both $xx and $yy will be called, as expected. One workaround is to code the destructor to actively dereference any embedded objects. The attached code illustrates both the bug and the workaround.