-
Notifications
You must be signed in to change notification settings - Fork 19
Memory leak 75 #83
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
base: main
Are you sure you want to change the base?
Memory leak 75 #83
Conversation
|
The address sanitizer still reports several memory leaks. You can see it on your own by adding Line 4 in d0303ee
Remember to run make clean.
From what I see, all of these problems can be resolved using |
|
|
||
| DreeNode(std::string &str); | ||
|
|
||
| ~DreeNode() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wont it increase the latency? Latency is already very high due to iterations. Lets not do this part. We will have to find some other way. Maybe concurrently. There is a separate issue for that.
Can we have some functionality like finally block in cpp (like what we have in python)? Lets figure out some doing it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure will look for other possibilities and discuss
| #include <iostream> | ||
| vector<pair<int, DreeNode *>> SearchDirectory::search(DreeNode *root, string &query, DreeHelpersI *dreeHelpers) { | ||
| vector<pair<int, DreeNode *>> searchResult; | ||
| vector<pair<int, pair<string, string>>> SearchDirectory::search(DreeNode *root, string &query, DreeHelpersI *dreeHelpers) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it decreasing the readability of the function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want the function signature to remain as - vector<pair<int, DreeNode *>> @ujjwall-R
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it make sure the function is readable.
|
Also, change the PR merge to dev branch. We will merge in main once we move for release after thorough testing. |
Worked on memory leak issue - 75