Deleting a record of a vector vector in C ++

0
Hello, I have a memory allocation problem, I have a class and this class I generate a vector, but because there is a lot of data, I end up saving all of them and eventually I use them only once, I would like to know if it is possible to delete

Creating the class

class storeProcess{

    public:

        vector< vector<int> > vectores;

        vector< vector<int> > vetores_fila;

        vector< vector<int> > vetores_class;

};

Here I declare a vector of this class

vector < storeProcess > storeStack;

After this, the storage is done as follows

void armazenarProcesso()
{

    indiceVet++;

    storeStack.push_back(storeProcess());

    storeStack[indiceVet].vectores = vectores;
    storeStack[indiceVet].vetores_fila = vetores_fila;
    storeStack[indiceVet].vetores_class = vetores_class;

}

After that, I do the process, and eventually I have to search for one of these processes, because the program works in a dynamic way.

void retornarProcesso()
{

    vectores  = storeStack[indiceVet].vectores;
    vetores_fila    = storeStack[indiceVet].vetores_fila;
    vetores_class     = storeStack[indiceVet].vetores_class;
    indiceVet--;

}

After getting this data I do not use it any more, I would like to know if there is any way to clear this data?

    
asked by anonymous 04.08.2018 / 00:15

0 answers