properly weaken self in closures to prevent circular references stopping objects from being destroyed