MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / _set

Method _set

Engine/source/core/util/refBase.h:395–414  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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//---------------------------------------------------------------

Callers

nothing calls this directly

Calls 3

getWeakReferenceMethod · 0.80
decRefCountMethod · 0.45
incRefCountMethod · 0.45

Tested by

no test coverage detected