Jump to content
  • Advertisement
Sign in to follow this  
Alexander Orefkov

Array with objects handles

This topic is 565 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

I was used 2.30 version and has that code:

interface ISomeIface {
array<ISomeIface@> ifaces;

void func(ISomeIface& i) {

And that work fine.

Now I upgrade to last svn version, and code become fall with exception. I debug it - in CScriptArray::SetValue value sended as pointer, not as handle, but template subtype has asTYPEID_OBJHANDLE flag and do unreference, that broke all.

It worked, if I change code as:

void func(ISomeIface@ i) {


void func(ISomeIface& i) {

What wrong in my first code? Why behavior is changed? Seems early compiler automatically convert value to handle, based on template type.

Edited by Alexander Orefkov

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!