Documentation / listeners / com.femastudios.listeners / BaseListenersManager / addWeakly

addWeakly

fun addWeakly(listener: Interface): Unit

Adds a listener, keeping a weak reference. This means that if nobody else keeps a pointer to the listener, it'll at some point automatically disposed by the Garbage Collector.