Sign in to follow this  

Assertion failed on exit with "shared" func

Recommended Posts


I have a "shared class" and I need to use a function outside the class. The compiler warns me that I must use "shared" for the function too. I believe this is correct?

However when these functions are "shared" it seems something isn't freed properly because I get this assert on angelscript release:


GC cannot free an object of type '_builtin_function_', it is kept alive by the application

Assertion failed: func->returnType.GetObjectType() != type, file ..\..\source\as_configgroup.cpp, line 191
What am I doing wrong?

Share this post

Link to post
Share on other sites

The assert happens because for some reason an object type is being removed while there is still a function that returns that type.


It's quite possible that you're not doing anything wrong, instead the bug may be within AngelScript.


However, I need more information to investigate this. 


Just having a shared class calling shared global functions is not causing this, so you have something more than that. Would it be possible for you to create a small test case that reproduces the problem?

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