There are some ways to ascertain or observe memory leaks: -
  • FBRetainCycleDetector

It is an open source library launched by Facebook in 2016 F8 Conference. Its goal is to observe all doable retain cycles in Objective-C codebase throughout the runtime.

  • Debug Memory Graph

Actually, Xcode offers us a native way — debug memory graph to observe memory leaks. It a tool initial introduced in Xcode eight and is ready to grab leaks like retain cycles

  • Allocations and Leaks Instrument

Instruments are powerful debugging and identification tools that come packaged with Xcode. For memory problems, we have a tendency sometimes to use allocations and leaks tools. Allocations instrument tracks all of the objects that app allocates over the course of its run; leaks instrument checks all memory and figures out the leaked objects. Compared to rectify memory graph, these instruments provide a lot of in-depth check out memory leaks.

BY Best Interview Question ON 29 Mar 2019