Open ScottjBrinley opened 1 year ago
Thanks for the suggestion @ScottjBrinley . You're right that for Xcode users this is definitely the best approach.
EDIT: Do you care to make a PR with a suggested fix? That's why this repo is public! :)
Closing this - the leak checking tutorial was updated to use leaks
in #110.
Whoops, I was a bit too hasty. I see now that this is a suggestion to amend the Xcode tutorial, not the leak checking tutorial. (I think?) I don't have a strong opinion on whether that should be added or not.
What Currently the address sanitizer on mac doesn't detect memory leaks. However, for XCode users, there is a simple and easy way to turn on memory leak detection.
Where This would be best for the leak checking tutorial https://eecs280staff.github.io/tutorials/setup_leakcheck.html
Why I was having trouble detecting a memory leak in project 4 and the tutorial didn't help me because I use XCode on a mac. As such, I did some research to find out if there was a built in implementation and it turns out it is a very simple fix.
References
Link to the website that I used to figure out how to turn on the memory leak checker:
https://zendesk.engineering/ios-identifying-memory-leaks-using-the-xcode-memory-graph-debugger-e84f097b9d15
Go to Product->Scheme->Edit Scheme->Diagnostics, then turn on malloc scribble and malloc stack(as shown in image)