Example:
C++// asOBJ_NO_GLOBAL - new modifierengine->RegisterObjectType("MyClass",0,asOBJ_REF|asOBJ_NO_GLOBAL);AngelScriptMyClass@ global; // Errorvoid func(MyClass& local){} // Okvoid main(){MyClass@ local=GetMyObject();} // Ok
This need for multithreading synchronization, because object locks before script function call and unlocks after. But if user store it in global scope than this object can not be locked in next time.