()
| 205 | } |
| 206 | |
| 207 | public void testGoRefGC() { |
| 208 | S s = Testpkg.new_(); |
| 209 | runGC(); |
| 210 | long collected = Testpkg.numSCollected(); |
| 211 | assertEquals("Only S should be pinned", 0, collected); |
| 212 | |
| 213 | s = null; |
| 214 | runGC(); |
| 215 | collected = Testpkg.numSCollected(); |
| 216 | assertEquals("S should be collected", 1, collected); |
| 217 | } |
| 218 | |
| 219 | private class AnI implements I { |
| 220 | public void e() throws Exception { |