Memory measurement in C++
问题 Is it possible to measure amount of memory being released after the object being terminated by destructor. I'm trying to check whether resources are properly managed. For example, I've written an implementation of the LinkedList and testing it: int main(int argc, char** argv) { //check point for initial memory int64_t init = ??? ; //next points of measurement int64_t point_a, point_b; List<int> list; list.push_back(5); { List<double> l; l.push_back(-0.12); l.push_back(1.6); // ... do