| | 109 | |
|---|
| | 110 | #ifdef OSG_MT_CPTR_ASPECT |
|---|
| | 111 | _pAspectStore->removePtrForAspect(Thread::getCurrentAspect()); |
|---|
| | 112 | |
|---|
| | 113 | if(_pAspectStore->getRefCount() == 1) |
|---|
| | 114 | { |
|---|
| | 115 | this->deregister(Inherited::getId()); |
|---|
| | 116 | this->onDestroy (Inherited::getId()); |
|---|
| | 117 | } |
|---|
| | 118 | |
|---|
| | 119 | OSG::subRef(_pAspectStore); |
|---|
| | 120 | #else |
|---|
| | 121 | this->deregister(Inherited::getId()); |
|---|
| | 122 | this->onDestroy (Inherited::getId()); |
|---|
| | 123 | #endif |
|---|
| | 124 | |
|---|
| | 125 | delete this; |
|---|
| | 126 | } |
|---|
| | 127 | else |
|---|
| | 128 | { |
|---|
| | 129 | Thread::getCurrentChangeList()->addSubRefd(Inherited::getId()); |
|---|
| | 130 | } |
|---|
| | 131 | |
|---|
| | 132 | } |
|---|
| | 133 | |
|---|
| | 134 | |
|---|
| | 135 | inline |
|---|
| | 136 | void FieldContainer::subReferenceLocalVar(void) |
|---|
| | 137 | { |
|---|
| | 138 | --_iRefCount; |
|---|
| | 139 | |
|---|
| | 140 | if(_iRefCount <= 0) |
|---|
| | 141 | { |
|---|
| | 142 | |
|---|
| | 143 | Thread::getCurrentChangeList()->incSubRefLevel(); |
|---|
| | 144 | |
|---|
| | 145 | this->resolveLinks(); |
|---|
| | 146 | |
|---|
| | 147 | Thread::getCurrentChangeList()->decSubRefLevel(); |
|---|
| | 148 | |
|---|
| | 149 | Thread::getCurrentChangeList()->addSubRefd(Inherited::getId(), |
|---|
| | 150 | true); |
|---|