Deleting References
The following methods are used to delete references when they are no longer needed:
ReferenceMaker::DeleteAllRefs()
- Deletes all references to and from the reference maker. It is equivalent to callingReferenceMaker::DeleteAllRefsFromMe()
andReferenceMaker::DeleteAllRefsToMe()
. This method should be called from the destructor of a reference maker derived object, if there is any chance that the object is not deleted automatically by Max (which is not recommended).ReferenceMaker::ReplaceReference()
- This will delete a reference and replace it with a new one.ReferenceMaker::DeleteReference()
- This has the same effect as callingReferenceMaker::ReplaceReference()
withNULL
as the target.
Note: never call
ReferenceMaker::SetReference()
, this is called by 3ds Max.Calls to the following methods can be replaced by a call to ReferenceMaker::DeleteAllRefs()
:
ReferenceMaker::DeleteAllRefsFromMe()
- Deletes all references from a reference maker.ReferenceMaker::DeleteAllRefsToMe()
- Deletes all the references to this reference maker/target. This also sends the REFMSG_TARGET_DELETED message to all dependents.