[Development] QList for Qt 6

Jason H jhihn at gmx.com
Mon May 20 17:03:05 CEST 2019


> Ok, QList as an alias for QVector takes care of the technical issues I
> have with using inheritance. It doesn't address my concerns regarding
> breaking QList behaviour. What purpose is served to call something QList
> that is in fact a QVector? Please spell it out for me, as I don't see
> it.

My understanding is that QVector requires contiguous memory, consuming a giant block for all the items in the list. QList is just a linked list. QVector will fail sooner when memory fragmentation is a problem. I would expect systems with long-running processes and limited RAM (i.e. embedded, a Raspberry Pi, phone, etc) to encounter this sooner than other systems, especially when the size of each object is large. (You could always just store pointers though)





More information about the Development mailing list