Does it use a vector? It's a memory leak. #6

Closed
opened 2017-04-25 20:01:39 -04:00 by kennyrkun · 0 comments
kennyrkun commented 2017-04-25 20:01:39 -04:00 (Migrated from github.com)

Basically, in all the places we use vectors, we never properly call delete on the objects when removing.

e.g. panes.erase(std::remove(begin(), end(), focusedPane), end());
Doesn't actually destroy the object, it only removes it from the stack. (Because it's a pointer object.)

memory leak.

Update:

only the Renderer does this now, because it doesn't delete the things when removing from queue.

Basically, in all the places we use vectors, we never properly call delete on the objects when removing. e.g. `panes.erase(std::remove(begin(), end(), focusedPane), end());` Doesn't actually destroy the object, it only removes it from the stack. (Because it's a pointer object.) *memory leak.* Update: only the Renderer does this now, because it doesn't delete the things when removing from queue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kennyrkun/Atraxian#6
No description provided.