The whole point of a shared_ptr is that you
can't delete it out from under other users. You can do exactly what you suggest with a weak_ptr.
A shared_ptr to an object with a deinit() is rather like a weak_ptr in that someone else can "delete" it, and you should check if it's really there, except it can still have some information about things like deinit failures rather than just telling you that the object is deleted.