assertFalse("Event ref collected before TagList is unreferenced", waitGC(evRef));
tl = null;
assertTrue("Event ref not collected after TagList is unreferenced", waitGC(evRef));
}
@Test public void Event_testGC() throws Exception {
Event ev = new LatencyEvent(ClockTime.NONE);
@SuppressWarnings("unused")
Structure s = ev.getStructure();
WeakReference<Event> evRef = new WeakReference<Event>(ev);
ev = null;
assertFalse("Event ref collected before Structure is unreferenced", waitGC(evRef));
s = null;
assertTrue("Event ref not collected after Structure is unreferenced", waitGC(evRef));