while(condition){
    TConfig* curConfig = new TConfig();
    for( auto it : configMap)
    {
        itr->second = curConfig;
    }
}
if(condition)
    delete configMap[2];
    // set all elements equal to confidMap[2] to null
I need to make a map of pointers. Some elements in the map will be same. When I process one element I need all the same elements to be set to null. One option is to iterate over the map each time I process an element and set the elements to null. Can this be achieved in a more efficient way. Maybe by using shared Pointers.
 
     
     
    