131132133134135136137138139140141
MyRef aRef1= new MyRef(); MyRef aRef2= new MyRef(); adapter.addReference(aRef1); adapter.addReference(aRef2); r[i++]= adapter.queryAdapted() == comp; comp= null; System.out.println("Wait 5 sec"); for(int c= 0; c < 50; c++) { try
148149150151152153154155156157158
} } r[i++]= aRef1.nDisposeCalled == 1; r[i++]= aRef2.nDisposeCalled == 1; r[i++]= adapter.queryAdapted() == null; adapter.removeReference(aRef1); // should not do any harm adapter.removeReference(aRef2); comp= new SomeClass(); adapter= comp.queryAdapter();
124125126127128129130131132133134
141142143144145146147148149150151
128129130131132133134135136137138
145146147148149150151152153154155
136137138139140141142143144145146
153154155156157158159160161162163