I thought of that too, but will the object ever be destructed then? I want the lookup task to be running for the lifetime of the browser object, but since I'm holding the last reference myself it seems it will remain valid forever. In other words, instead of performing the cleanup in the object's exit callback I need a notification when the refcount reaches 1, right?