お題:循環参照を開放せよ。

java
https://ideone.com/xe64l4
・ガベコレの対象になったのを確認まででヨシとす

c++
https://ideone.com/1gXTAX