Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

3 Neutral

About MrFloat

  • Rank

Personal Information

  • Interests

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. MrFloat

    shared_pointer with addref/release

    You can force the compiler to generate all the desired template variations and then register those directly to the scripting engine. For AngelScript you would register a fake shared pointer template class with no implementation and then properly register all the supported "T" types as full class specialisations. Its probably still possible to make a generic wrapper implementation but it would not be as straight forward as the first option. most methods would end up having several runtime code paths to reinterpret something like a byte buffer into a shared pointer of void* or a shared pointer of shared_pointer_this_base*. Even then you would need to be sure that any classes deriving from shared_pointer_this_base would not generate an address offset for casting to that type. I just went with template class specialisation when I had a similar issue :(
  • 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!