ScriptString registration
the asCScriptString class in scriptstring.cpp is registered using asOBJ_CLASS_CDA, but there is no destructor specified. Should it correctly be asOBJ_CLASS_CA, or can you just use asOBJ_CLASS_CDA globally even if you dont use some of the behaviours (construction, destruction and assignment) without any problems? I understand that the reference counting behaviours are defined, so angelscript will just use that to correctly delete the string, but still, is the asOBJ_CLASS_CDA registration parameter correct if there is no destructor specified?
The argument asOBJ_CLASS_CDA tells AngelScript how C++ handles the object, not what behaviours will be used by AngelScript.
It's important to tell AngelScript whether the class has constructors, destructors, or the assignment operator defined, because this changes the way C++ passes the class in parameters or the way it is returned by functions.
Regards,
Andreas
It's important to tell AngelScript whether the class has constructors, destructors, or the assignment operator defined, because this changes the way C++ passes the class in parameters or the way it is returned by functions.
Regards,
Andreas
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement