In computer programming, the lapsed listener problem is a common source of memory leaks for object-oriented programming languages, among the most common ones for garbage collected languages.
In basic implementation, this requires both explicit registration and explicit deregistration, as in the dispose pattern, because the subject holds strong references to the observers, keeping them alive.
The leak happens when an observer fails to unsubscribe from the subject when it no longer needs to listen.
This causes not only a memory leak, but also a performance degradation with an "uninterested" observer receiving and acting on unwanted events.
This can be prevented by the subject holding weak references to the observers, allowing them to be garbage collected as normal without needing to be unregistered.