Учитывая следующий код (обработка ошибок была удалена для читаемости): < /p>
Код: Выделить всё
#include
#include
#include
#define HEAPBUFFER (100000)
class Foo {
public:
Foo() {
foo_buffer = nullptr; //Construct to null
}
~Foo(){
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79770333/copying-heap-allocated-memory-in-multiple-threads-is-a-mutex-required-or-is-i[/url]
Мобильная версия