I can't remember any Java examples at the moment, but I do recall a memory leak that I had created in C#.
Registering an event handler in .Net creates a reference to the handler. This means that an event handler that doesn't un-register itself from it's event will never be garbage collected. In the context of a GUI application, this means that you have to be careful to ensure that child windows remove their event handlers when they're closed. Otherwise, your application will leak memory, as the closed windows will never be garbage collected.
Registering an event handler in .Net creates a reference to the handler. This means that an event handler that doesn't un-register itself from it's event will never be garbage collected. In the context of a GUI application, this means that you have to be careful to ensure that child windows remove their event handlers when they're closed. Otherwise, your application will leak memory, as the closed windows will never be garbage collected.