commit 2025-10-05 21:55 edit a bit ZtCObjNew : ZCppMain/ZMainHead.H
This commit is contained in:
@ -4606,10 +4606,28 @@ namespace ZNsMain
|
||||
{ return *this; }
|
||||
/*++++++++++++++++++++++++++++++++++++++++++++++++++*/
|
||||
|
||||
#if(_CODE_OLD_)
|
||||
mp_StTypeRefCnt->MO_TypeData =
|
||||
rhs.mp_StTypeRefCnt->MO_TypeData ;
|
||||
#else
|
||||
/*//////////////////////////////////////////////
|
||||
|
||||
return *this; ////////////////////
|
||||
■ ZtCObjNew 를 설계한 뜻에 비추어,
|
||||
위보다 아래 코드가 더 적합해 보인다.
|
||||
만약 위 코드의 동작을 수행하려면
|
||||
|
||||
**this = *rhs
|
||||
|
||||
처럼 하면 된다. -- 2025-10-05 21:42
|
||||
|
||||
//////////////////////////////////////////////*/
|
||||
if(--mp_StTypeRefCnt->MI_RefCount <= 0)
|
||||
this->ZCAllocator::FiniMem(mp_StTypeRefCnt);
|
||||
|
||||
mp_StTypeRefCnt = rhs.mp_StTypeRefCnt ;
|
||||
++mp_StTypeRefCnt->MI_RefCount ;
|
||||
#endif
|
||||
return *this; /*::::::::::::::::::::::::::::::*/
|
||||
}/*
|
||||
ZtCObjNew& operator=(const ZtCObjNew& rhs)*/
|
||||
|
||||
@ -4627,7 +4645,7 @@ namespace ZNsMain
|
||||
operator TypeData& (){return mp_StTypeRefCnt->MO_TypeData;}
|
||||
|
||||
ZTypInt GetRefCnt () const{return mp_StTypeRefCnt->MI_RefCount;}
|
||||
TypeData* GetObjPtr () const{return &mp_StTypeRefCnt->MO_TypeData;}
|
||||
TypeData& GetObjRef () const{return &mp_StTypeRefCnt->MO_TypeData;}
|
||||
|
||||
public :
|
||||
};/*
|
||||
|
Reference in New Issue
Block a user