@Test public void testRegisterWeak() throws Exception { assertEquals(0, Receiver1.lostCount); informer.registerWeak(new Receiver1()); System.gc(); informer.post(11); assertEquals(0, Receiver1.lostCount); }
public void registerWeak(Object subscriber) { register(subscriber, true); }
Informer { public void registerWeak(Object subscriber) { register(subscriber, true); } }
Informer { public void registerWeak(Object subscriber) { register(subscriber, true); } Informer();  Informer(ExceptionListener listener); }
Informer { public void registerWeak(Object subscriber) { register(subscriber, true); } Informer();  Informer(ExceptionListener listener); void post(Object event); void postAfter(final Object event, final long millis); void registerWeak(Object subscriber); void registerStrong(Object subscriber); boolean unregister(Object subscriber); void register(Object subscriber, boolean registerWeak); }
Informer { public void registerWeak(Object subscriber) { register(subscriber, true); } Informer();  Informer(ExceptionListener listener); void post(Object event); void postAfter(final Object event, final long millis); void registerWeak(Object subscriber); void registerStrong(Object subscriber); boolean unregister(Object subscriber); void register(Object subscriber, boolean registerWeak);  }