Timeline for PSET5 Valgrind memory leak in load() and errors in many contexts
Current License: CC BY-SA 3.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 23, 2017 at 12:37 | history | edited | CommunityBot |
replaced http://stackoverflow.com/ with https://stackoverflow.com/
|
|
Jun 28, 2016 at 2:09 | comment | added | Shubham Dave | @DinoCoderSaurus I have kept screenshots of the code as well as error alongside on the CS50 group of FB. link | |
Jun 28, 2016 at 1:43 | comment | added | Shubham Dave | @DinoCoderSaurus I seem to have similar problem but I have written "return;" for the recursive delete code. If you could have a look at my code and suggest changes. Program works perfectly in terms of logic but memory leaks are an issue. | |
Apr 7, 2016 at 0:57 | vote | accept | Connie | ||
Apr 7, 2016 at 0:57 | comment | added | Connie | I added return; after free(cursor); -- it seems to have cleared up the issue. Who knew it was so simple? But now I get what's going on. Thanks! | |
Apr 7, 2016 at 0:50 | comment | added | Connie | I see, I did not know that was a thing, but it makes sense! How would I go about solving such a problem? If I make the stack size larger (assuming I'm allowed to do so), would it be fixed? Is there some other way to approach it? | |
Apr 6, 2016 at 16:14 | comment | added | DinoCoderSaurus | DOH! Yes, I read that wrong. It is still the root of your problem, answer has been amended. | |
Apr 6, 2016 at 16:14 | history | edited | DinoCoderSaurus | CC BY-SA 3.0 |
amended
|
Apr 6, 2016 at 3:22 | comment | added | Connie | I just reviewed my unload code, and I don't see how I'm only freeing 27 nodes -- could you elaborate? Since it's a recursive call, it should be able to keep going down the trie until the bottom, and make its way up/down until all nodes are freed. Good catch on the position value though, I should have set it to 26 for the apostrophe, forgot about the 0-indexing! | |
Apr 5, 2016 at 11:17 | history | answered | DinoCoderSaurus | CC BY-SA 3.0 |