Cleanup memory using the removal callback.