HashMap Memory Leak because of Dynamic Array
- by Jake M
I am attempting to create my own HashMap to understand how they work. I am using an array of Linked Lists to store the values(strings) in my hashmap.
I am creating the array like this:
Node** list;
Instead of this:
Node* list[nSize];
This is so the array can be any size at runtime. But I think I am getting a memory leak because of how I am…