Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 16874

asASSERT abort on delegate early destruction after Release()

$
0
0

Hi, I'm having an issue trying to use delegates on script callback functions as the example in https://www.angelcode.com/angelscript/sdk/docs/manual/doc_callbacks.html

Context: I have a C++ Class for networking, that I could mostly wrap for access in angelscript. Then I need some SetOnConnect, SetOnDisconnect, SetOnMessage functions to bind in Angelscript to call some AS class methods to handle the callbacks.

Following the simplest example, passing a function, it works flawless, but when using the delegate example saving the function, object and type, after doing the cb->Release() line, the application crashes.

Debugging showed that …


Viewing all articles
Browse latest Browse all 16874

Trending Articles