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

Method RemoveTemplateInstanceType

sdk/angelscript/source/as_scriptengine.cpp:3632–3653  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3630}
3631
3632void asCScriptEngine::RemoveTemplateInstanceType(asCObjectType *t)
3633{
3634 // If there is a module that still owns the generated type, then don't remove it
3635 if( t->module )
3636 return;
3637
3638 // Don't remove it if there are external refernces
3639 if( t->externalRefCount.get() )
3640 return;
3641
3642 // Only remove the template instance type if no config group is using it
3643 if( defaultGroup.generatedTemplateInstances.Exists(t) )
3644 return;
3645 for( asUINT n = 0; n < configGroups.GetLength(); n++ )
3646 if( configGroups[n]->generatedTemplateInstances.Exists(t) )
3647 return;
3648
3649 t->DestroyInternal();
3650 templateInstanceTypes.RemoveValue(t);
3651 generatedTemplateTypes.RemoveValue(t);
3652 t->ReleaseInternal();
3653}
3654
3655// internal
3656asCObjectType *asCScriptEngine::GetTemplateInstanceType(asCObjectType *templateType, asCArray<asCDataType> &subTypes, asCModule *requestingModule)

Callers 1

InternalResetMethod · 0.80

Calls 6

RemoveValueMethod · 0.80
getMethod · 0.45
ExistsMethod · 0.45
GetLengthMethod · 0.45
DestroyInternalMethod · 0.45
ReleaseInternalMethod · 0.45

Tested by

no test coverage detected