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. Qt pointers container destorying
Forum Update on Monday, May 27th 2025

Qt pointers container destorying

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 461 Views
  • 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.
  • H Offline
    H Offline
    Harb
    wrote on 1 Nov 2015, 21:38 last edited by Harb 11 Jan 2015, 22:12
    #1

    Hi!
    Does qt pointer container clean up data which it point to. I mean, if have created QList<int*> or QVector<char*> object, and than destructor for thous objects is called, will it delete data as well as pointers to it, or I need to do it explicitly?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 1 Nov 2015, 21:53 last edited by
      #2

      Hi,

      No it doesn't, use qDeleteAll before clearing your list

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1

      1/2

      1 Nov 2015, 21:38

      • Login

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