Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
5.15.12, 6.4.2
-
None
-
506d23775 (dev), dec1e2805 (6.5)
-
DaVinci 77, DaVinci 78, DaVinci 79
Description
It is often useful to allocate a QByteArray without explicitly initializing the content as it will immediately be filled out by some other means (eg reading from file)
The constructor QByteArray data(byteCount, Qt::Uninitialized) appears to do this, but it is not documented anywhere.
Note: In reality, many allocators do in fact null out allocated data for security reasons, so usually only the performance difference is visible unless you're using a debug or custom allocator.