clear memory early by swap trick

This commit is contained in:
Dennis Luxen 2013-11-26 19:56:45 +01:00
parent 38bf0c276c
commit f77fa5b34c

View File

@ -296,6 +296,7 @@ int main (int argc, char *argv[]) {
IteratorbasedCRC32<std::vector<EdgeBasedNode> > crc32;
unsigned crc32OfNodeBasedEdgeList = crc32(nodeBasedEdgeList.begin(), nodeBasedEdgeList.end() );
nodeBasedEdgeList.clear();
std::vector<EdgeBasedNode>(nodeBasedEdgeList).swap(nodeBasedEdgeList);
SimpleLogger().Write() << "CRC32: " << crc32OfNodeBasedEdgeList;
/***