Sign in to follow this  

Binding cast functions

Recommended Posts

_Engine_    310



We are binding C++ classes and cast functions from base class. We get errors like this - "0:50.375 -  (0, 0) : ERR : Type 'SymbolInstSplashScreenSymbol' is still used by function 'SymbolInstSplashScreenSymbol@ NGUIWidget::_beh_10_()'" when in script we use cast functions. When we close scene angelscript are crushes (screenshot of call stack are attached). We use flags asBEHAVE_REF_CAST and asBEHAVE_IMPLICIT_REF_CAST when register cast functions.


If we are use flags asBEHAVE_VALUE_CAST and asBEHAVE_IMPLICIT_ witch looks like more properly because we do not need any reference count when use cast operator than all things became more badly - more errors comes and our scene crushes after binding not after closing as was before.


So looks like using cast functions leads to unnecessary reference count and this leads to internal crush of angelscript.

Share this post

Link to post
Share on other sites
WitchLord    4677

Can you please provide an example that reproduces the problem? From the little information you provided I cannot determine if it might be a bug in AngelScript or if you've just implemented the cast operators that you register with AngelScript incorrectly.




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