Forum Discussion
7 years ago
@d3adc3II wrote:
It's normal bro. It's called memory leaked and it happens in every game i played, haiz from battlefield, call of duty to pubg.
The longer u play, the more memory the game eats and never release
// some c++
size_t size(0);
double *temp_ptr(nullptr);
cout << "how many temps? ";
cin >> size;
temp_ptr = new double[size];
cout << temp_ptr << endl;
// incorrect; creating a memory leak
temp_ptr = nullptr;
delete [] temp_ptr;
// correct; creating a memory leak
delete [] temp_ptr;
temp_ptr = nullptr;
// so if you have a memory leak, use (delete[] name_of_variable) before (name_of_variable = nullptr).
7 years ago
i had a logical bug in my previous reply, so i fixed the code. its how to fix memory leaks from incorrectly using the heap.
About Apex Legends Technical Issues
Having issues with Apex Legends? Join here to find help with connectivity, performance issues, crashes and more.38,557 PostsLatest Activity: 9 hours ago
Community Highlights
Recent Discussions
- 9 hours ago
- 12 hours ago
- 12 hours ago
- 12 hours ago
- 14 hours ago