I have a std::vector<byte> object and I want to extract data from it without copying.
It may contain megabytes of data. So, if I copy data I would lose performance.
Is it possible to extract the data from the vector and make it forget about data, that is, that it doesn't free memory for the data after destruction?
Hope for your help!
Thanks in advance!
P.S: extract in this case means just get a raw pointer to the data and make vector forget about it (i.e don't free the memory after destruction)