Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup calls. #93

Open
krs-world opened this issue May 19, 2019 · 1 comment
Open

cleanup calls. #93

krs-world opened this issue May 19, 2019 · 1 comment
Assignees

Comments

@krs-world
Copy link
Contributor

DataStructure::cleanup()

Need to have a careful look at our destructors for various data structures. One user used the destructor for Graphs using this method and it crashed. Need to look at memory issues for all classes.

@krs-world
Copy link
Contributor Author

Added a destructor for GraphAdjList - deallocates the vertex elements and adj list elements (both are pointers to allocated memory) and clears the maps. If the graph is allocated by the user, then he/she is responsible for freeing it.

The tests work, but perhaps need more careful testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants