MCPcopy Create free account
hub / github.com/anjo76/angelscript / AddRefScriptObject

Method AddRefScriptObject

sdk/angelscript/source/as_scriptengine.cpp:5715–5734  ·  view source on GitHub ↗

interface

Source from the content-addressed store, hash-verified

5713
5714// interface
5715void asCScriptEngine::AddRefScriptObject(void *obj, const asITypeInfo *type)
5716{
5717 // Make sure it is not a null pointer
5718 if( obj == 0 || type == 0 ) return;
5719
5720 const asCTypeInfo *ti = reinterpret_cast<const asCTypeInfo*>(type);
5721 if (ti->flags & asOBJ_FUNCDEF)
5722 {
5723 CallObjectMethod(obj, functionBehaviours.beh.addref);
5724 }
5725 else
5726 {
5727 asCObjectType *objType = CastToObjectType(const_cast<asCTypeInfo*>(ti));
5728 if (objType && objType->beh.addref)
5729 {
5730 // Call the addref behaviour
5731 CallObjectMethod(obj, objType->beh.addref);
5732 }
5733 }
5734}
5735
5736// interface
5737void asCScriptEngine::ReleaseScriptObject(void *obj, const asITypeInfo *type)

Callers 15

MakeDelegateMethod · 0.80
ExecuteStringFunction · 0.80
SetMethod · 0.80
SetValueMethod · 0.80
CopyBufferMethod · 0.80
RestoreMethod · 0.80
RestoreHandlesMethod · 0.80
GetMethod · 0.80
AddRefHandleMethod · 0.80
scriptany.cppFile · 0.80
StoreMethod · 0.80
SetValueMethod · 0.80

Calls 1

CastToObjectTypeFunction · 0.85

Tested by 3

SetMethod · 0.64
AddRefHandleMethod · 0.64
SetCBFunction · 0.64