Hi!
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.