sirikata/sirikata — Issue #481: HostedObject::destroy during connection process can leave stray shared_ptr
Author: danielrh
Created: 2012-01-23 06:08:50+00:00
State: open

calling HostedObject::destroy sets
HostedObject::destroyed=true

which causes things like HostedObject::connect or HostedObject::disconnect to return before doing anything meaningful

specifically unregisterHostedObject(sporef,) is not called ever
This means that a strong pointer is held for the foreseeable future.

If we can guarantee that either connected or disconnected are called on HostedObject for each connection request, then we can simply check if stopped is called and unregister the HostedObject from the ObjectHost