Qt3D 1.0: Ownership of abstract object pointers passed to QGLSceneNode
I'm stuck with Qt3D 1.0 until I finish this university project (2.0 is getting me excited though), and I have a question regarding a few of the functions on QGLSceneNode. Looking at the code, it seems that where a QGLAbstractEffect pointer is passed, a QGLGraphicsTransform3D, or whatever other abstract pointers are used, the QGLSceneNode does not take ownership of the objects - ie. they're not deleted anywhere in the class code. What's the correct way to manage the ownership of these objects? I don't know whether to allocate my transforms, for example, on the stack or the heap - I can't see it being the former because they'd just get deleted at the end of the function and undefined behaviour would abound, but if the latter then it'd put me in the irritating position of having to ensure that the scene node was deleted before any of the transforms it pointed to. Is there a good practice method of managing this?