Hello all:
I am trying to expose the world class to my scripting interface. The thing is, I don't want to just create dummy functions to handle addref and release since I am trying to keep this as moduler as possible. Is there a way that I can do this without those extra functions?
Also: I will be creating objects later that will work with the engine that scripting can create. What do I do when the ref is zero? can I just delete this?
Thanks
Creating transparent objects without addref and release
If the world class is a singleton you can register it with the flag asOBJ_NOHANDLE. In this case the addref and release behaviours shouldn't be registered.
For objects that use reference counting, refCount == 0 means that there are no references to the object so it is safe to delete it.
For objects that use reference counting, refCount == 0 means that there are no references to the object so it is safe to delete it.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement