Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt3D 1.0: Ownership of abstract object pointers passed to QGLSceneNode
Qt 6.11 is out! See what's new in the release blog

Qt3D 1.0: Ownership of abstract object pointers passed to QGLSceneNode

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 640 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • X Offline
    X Offline
    x6herbius
    wrote on last edited by
    #1

    Hi,

    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?

    Thanks.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved