标签: java class oop object memory-management
假设,当我们在另一个类(private List<SecurityReference> defaultAuth() { return Lists.newArrayList(new SecurityReference("xauth", new AuthorizationScope[0])); } 类中创建一个类(A类)的对象时,每次我们创建B类的对象时,创建A类的对象?在这里如何分配内存?
private List<SecurityReference> defaultAuth() { return Lists.newArrayList(new SecurityReference("xauth", new AuthorizationScope[0])); }
A
B
下面的示例代码段;