Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-1397

QVector and memory problems

    XMLWordPrintable

Details

    Description

      QList<> will call qFatal when it fails to allocate enough money giving the programmer a chance to do some cleanup before the application crashes.

      QVector<> does not seem to do this. It would be helpful if it did.

      E.g.

      void QListData::realloc(int alloc)
      {
      Q_ASSERT(d->ref == 1);
      Data *x = static_cast<Data *>(qRealloc(d, DataHeaderSize + alloc * sizeof(void *)));
      if (!x)
      qFatal("QList: Out of memory");

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tmacieir Thiago Macieira (closed Nokia identity) (Inactive)
            rve Anders Bakken
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes