Jump to content
  • Advertisement
Sign in to follow this  
_Vicious_

Reset all global handlers to null

This topic is 2508 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello Andreas,

I've got another question for you :)

Due to some particularly tricky integration with another library we would like to be able to reset from the C++ all global AS handler variables to null. That would allow automatic release of reference counted resources in that external library. How can we do that?

Share this post


Link to post
Share on other sites
Advertisement
That function will properly release the handles, and then initialize them using their default values assigned when the module was first compiled.

If you want finer control you need to enumerate the global variables, and reset the ones you want. Use the modules GetGlobalVarCount, GetGlobalVar, and GetAddressOfGlobalVar. The latter will give you a pointer to the handle. Call Release on the object, and then set the handle to 0.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!