Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How to clear out a QGLSceneNode's transforms() list?



  • The following crashes with "free(): invalid pointer."

    Why does it crash? How else should I clear out a node's transform list, while making sure I clean up the memory allocated for all those transforms?
    @
    while ( ! transforms().isEmpty() ) {
    delete transforms().takeFirst();
    }
    @

    [Wrapped code in @ tags; mlong]


Log in to reply