clear memory early by swap trick
This commit is contained in:
parent
3df89c0dfe
commit
4455e816aa
@ -296,6 +296,7 @@ int main (int argc, char *argv[]) {
|
|||||||
IteratorbasedCRC32<std::vector<EdgeBasedNode> > crc32;
|
IteratorbasedCRC32<std::vector<EdgeBasedNode> > crc32;
|
||||||
unsigned crc32OfNodeBasedEdgeList = crc32(nodeBasedEdgeList.begin(), nodeBasedEdgeList.end() );
|
unsigned crc32OfNodeBasedEdgeList = crc32(nodeBasedEdgeList.begin(), nodeBasedEdgeList.end() );
|
||||||
nodeBasedEdgeList.clear();
|
nodeBasedEdgeList.clear();
|
||||||
|
std::vector<EdgeBasedNode>(nodeBasedEdgeList).swap(nodeBasedEdgeList);
|
||||||
SimpleLogger().Write() << "CRC32: " << crc32OfNodeBasedEdgeList;
|
SimpleLogger().Write() << "CRC32: " << crc32OfNodeBasedEdgeList;
|
||||||
|
|
||||||
/***
|
/***
|
||||||
|
Loading…
Reference in New Issue
Block a user