When you clear the list, you delete all references to the handlers along with them. After your handlers leave the scope (that is, when the function finally exits and no objects refer to the created handlers), the garbage collector will manage to delete all the associated memory (according to its own schedule, of course).
No, you do not need to manually remove handlers.
source share