Allows to destroy the given list, and all user space associated memory if a destroy handler was provided.