How inner class object resides in memory?

后端 未结 3 1711
一向
一向 2020-12-15 01:41

Outer outer = new Outer();

an Object of Outer class is created on heap and reference variable points to it.

If I under

3条回答
  •  借酒劲吻你
    2020-12-15 02:14

    Naturally, the inner holds on to strong references of the things it wants strong references to - like the other half of its instance variables which reside in Outer.

提交回复
热议问题