Skip to content

XCode Memory Leak Detection Tutorial #118

@ScottjBrinley

Description

@ScottjBrinley

** 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)

Screen Shot 2023-03-28 at 7 33 35 PM

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions