Use proper return for CFactoryFnReturn::GetObjForTransfer

This commit is contained in:
Phillip Stephens 2023-01-13 22:40:19 -08:00
parent 5b126665df
commit d7a435fb5b
2 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ public:
template < typename T > template < typename T >
CFactoryFnReturn(T* ptr) : obj(TToken< T >::GetIObjObjectFor(ptr).release()) {} CFactoryFnReturn(T* ptr) : obj(TToken< T >::GetIObjObjectFor(ptr).release()) {}
IObj* GetObjForTransfer() const { return obj.release(); } const rstl::auto_ptr<CObjOwnerDerivedFromIObjUntyped>& GetObjForTransfer() const { return obj; }
private: private:
rstl::auto_ptr< CObjOwnerDerivedFromIObjUntyped > obj; rstl::auto_ptr< CObjOwnerDerivedFromIObjUntyped > obj;
}; };

View File

@ -40,7 +40,7 @@ void CObjectReference::Lock() {
IObj* CObjectReference::GetObject() { IObj* CObjectReference::GetObject() {
if (x10_object == nullptr) { if (x10_object == nullptr) {
x10_object = xc_objectStore->GetFactory().Build(x4_objTag, x14_params).GetObjForTransfer(); x10_object = xc_objectStore->GetFactory().Build(x4_objTag, x14_params).GetObjForTransfer().release();
} }
x3_loading = false; x3_loading = false;
return x10_object; return x10_object;