#include <iostream> #include <vector> class MyClass { public: void* ptr; MyClass() { ptr = malloc(sizeof(100000000)); } ~MyClass() { free(ptr); } }; MyClass myClass; int main() { std::vector<MyClass> vec; vec.push_back({}); }