Sign in to follow this  
Tylon

ScriptString registration

Recommended Posts

Tylon    181
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?

Share this post


Link to post
Share on other sites
WitchLord    4677
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this