| 393 | return NULL; |
| 394 | } |
| 395 | void _set( T* ptr ) |
| 396 | { |
| 397 | if( mReference ) |
| 398 | { |
| 399 | T* old = _get(); |
| 400 | if( old ) |
| 401 | old->decRefCount(); |
| 402 | |
| 403 | mReference->decRefCount(); |
| 404 | } |
| 405 | |
| 406 | if( ptr ) |
| 407 | { |
| 408 | ptr->incRefCount(); |
| 409 | mReference = ptr->getWeakReference(); |
| 410 | mReference->incRefCount(); |
| 411 | } |
| 412 | else |
| 413 | mReference = NULL; |
| 414 | } |
| 415 | }; |
| 416 | |
| 417 | //--------------------------------------------------------------- |
nothing calls this directly
no test coverage detected