weakReferenceToWebServerNotificationListener can be GC-ed. Wouldn't then weakReferenceToWebServerNotificationListener.get() return null ? How can weakReferenceToWebServerNotificationListener help to avoid memory leaks ?