Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
0 answers
102 views

Heap Memory Stair-Case rising in SwiftUI project

A simple keyboard extension app showing continuous heap memory allocation each time open the keyboard on screen. For easier understanding see the image below... Here is the KeyboardViewController: ...
Asim Roy's user avatar
  • 10.2k
1 vote
0 answers
92 views

Can't track heap memory usage in my C program at runtime

I took a look at similar question but it didn't serve my purpose. My actual programme crashed due to increasing memory in "RES" section from "top" command in ubuntu linux which is ...
Nafiul Alam Fuji's user avatar
0 votes
2 answers
706 views

How to recover memory leak from dynamic allocation in C++?

If I write: b = new int; b = new int; delete b; I know that delete b; only deletes the second b from memory. Since there is nothing pointing to the first b after this delete, there is memory leak. ...
John Park's user avatar
  • 335
2 votes
3 answers
7k views

unordered_map: clear() does not release heap on clear() [duplicate]

I am using unordered_map using g++ 4.9.2 on Solaris 10, but surprisingly I found that clear() does not release heap. Here's the sample code: #include <iostream> #include <unordered_map> ...
Dr. Debasish Jana's user avatar
0 votes
3 answers
483 views

Most convenient way to deallocate multiple memory pointers?

I'm looking for most convenient/best/smartest way for multiple memory deallocation. Not quite sure if that is best explanation out there, but here is an example that will show what i want to do: void ...
Sir DrinksCoffeeALot's user avatar
0 votes
1 answer
351 views

C++ Is it possible to leak memory if i'm not using dynamic memory

None of my code uses dynamic memory, but I do have a vector of pointers to a struct called Node, and in my code, I do lose references to those Nodes at one point. The struct looks like this: struct ...
jai's user avatar
  • 1
1 vote
1 answer
2k views

Global Dynamic Allcoated Variables in C++

There are three kinds of memory: static memory (static variables/members, global variables), stack, and heap. The definition of global variables is variables defined outside of any functions. I am ...
zijianz's user avatar
  • 19