I assume your question is about garbage collection. If so, just remove h0. Here's why...
By removing h0 from h1, you tell the garbage collector "hey, h0 is no longer referenced by anything, so you can garbage collect it". Once h0 is garbage collected, that means the boxed integer (10) is also not referenced, making it a candidate for garbage collection as well.
Garbage collection can be summarized as follows: if an object is no longer referenced by another object, it will be garbage collected (aka, released from memory). If there is some sort of circular referencing (such as variable A referencing variable B which then references variable A), then those objects will still be garbage collected so long as they aren't referenced by anything that the main threads can access.