in opencv how to store the contour every frame

hi,
in opencv when contour finded i try to store the contour,
i give a vector store ; to store ,

and i can store one group of vector, but new frame will cover the old frame,
so i just can draw them become a shape by ofVerte ,
i try let it not to clear(),but all the vertex of contour will be connect!!!

and how do i store every frame of contour , and draw it! thank you!!!

code like

  
  
for (int i = 0; i < contourFinder.nBlobs; i++){  
 mystorge.clear();  
 for (int j= 0 ; j < contourFinder.blobs[i].nPts ; j++){  
 ofPoint *c = new ofPoint(contourFinder.blobs[i].pts[j].x ,contourFinder.blobs[i].pts[j].y);  
 mystorge.push_back(c);  
 }  
}  
ofBeginShape();  
for (int i = 0; i < mystorge.size(); i++){  
ofVertex(mystorge[i]->x, mystorge[i]->y);  
}  
ofEndShape();