C++ (Qt)for (j = 0; j < NUM_TEST; ++j){ new int[3];}
C++ (Qt)boost::shared_ptr<SharedClass> sharedObj = anotherObj;
C++ (Qt)template <class T>void unsharePtr(boost::shared_ptr<T>& ptr){ if (!ptr.unique()) ptr=boost::make_shared<T>(*ptr.get());}...unsharePtr(sharedObj);sharedObj->не const метод
#define NUM_TEST (200LL * 1024 * 1024) int i, j; QVector<int> theVector[10]; for (i = 0; i < 10; ++i) { theVector[i].reserve(NUM_TEST); for (j = 0; j < NUM_TEST; ++j) theVector[i].append(1); theVector[i].resize(2); theVector[i].squeeze(); }