Remove all listeners to prevent memory leaks.