Q:

Pushing one cv::Mat into another is going to copy it? 

I have a std::vector<cv::Mat> descriptors where descriptor[i] is the descriptors matrix of the i-th image of my dataset.  
If I'm going to do:
cv::Mat descriptorsMat;
for(const auto mat : descriptors)
    descriptorsMat.push_back(mat);

is it going to copy mat at the end of descriptorsMat (which is inefficient both in time and memory) or is it going to add a reference of mat at the end of descriptorsMat (which is efficient, but could be considered unsafe)? 
WHY I NEED THIS: since I'm going to train a VlGMM from VLFeat with these descriptors matrix, I need to load all the data inside a float *.  So once I obtain descriptorsMat, I'm going to do:
if(!descriptorsMat.isContinous()){
    std::err<<"Descriptor matrix not continuous!"<<std::endl;
    return 1;
}
float *data = new float[descriptorsMat.total()];
std::memcpy(data,descriptorsMat.data,descriptorsMat.total() * sizeof(float));

If you have any better alternative solution, please post it! 

A:

This code will only copy the Mat object which is some kind of header or smart pointer to the actual data elements. 
cv::Mat descriptorsMat; 
for(const auto mat : descriptors)
      descriptorsMat.push_back(mat);

it is copying a Mat object but not the data.  The Mat object is similar to a smart pointer, it's reference counting the data references.  To deep copy the Mat data you have to call mat.clone or mat.copyTo

