K
Оч специпичная вещь
Относится только к векторам в плюсах
Size: a a a
K
CC
CC
CC
K
CC
CC
K
K
CC
CC
K
CC
CC
CC
CC
B
CC
CC
struct test_struct
{
std::vector<long double> something;
};
int main(int argc, char **argv) {
std::cout << "Hello, world!" << std::endl;
std::cout << sizeof(test_struct) << std::endl;
int i;
test_struct* test_ptr;
test_ptr = new test_struct[1024 * 1024 * 100];
std::cout << i << std::endl;
while (1);
std::cout << "Bye, world!" << std::endl;
return 0;
}
test_ptr = new test_struct[1024 * 1024 * 100];
instead of leaking memory with individual objects of type test_struct
CC