QArray uses explicit sharing with a reference count. If more than one array share common data, and one array is modified, all arrays will be modified. The benefit of sharing is that a program does not need to duplicate data when it is not required, which results in less memory usage and less copying of data. An array can also be instantiated through a macro expansion, but this is necessary only for compilers that do not support templates. We recommend using templates if your compiler supports it.
Macros are much harder to debug.
QArray defaults to QArrayT if templates are supported, QArrayM otherwise. Constructs a shallow copy of a. Note that the elements are not initialized. Use at own risk. Returns a pointer to the array.