set objectmgr as a shared_ptr