Assignment #1-Part 2

84 views
Skip to first unread message

Yogesh Sonik

unread,
Sep 23, 2020, 1:04:08 AM9/23/20
to cmpt-295-sfu
SFU ID: 301363019
Github username:YSonik
Line and file: main.c
Expected behavior: Free's the memory allocated for each node in the tree
Observed behavior: no such function or function call
Question: After completing the two functions for part 2 of the assignment, I ran valgrind on the executable and observed that it detected memory leaks. I then inspected the main.c file and was unable to find any calls to a function which would free the memory associated with each node of the tree. Are we expected to implement a function that will free the memory?


kourosha...@gmail.com

unread,
Sep 23, 2020, 1:53:52 AM9/23/20
to cmpt-295-sfu
I believe this is expected. If you do valgrind --leak-check=yes ./tree.bin it will show the problem is from acutest.h in the trace back section.
Reply all
Reply to author
Forward
0 new messages