InterviewSolution
| 1. |
How do you check if your code has memory leaks? |
|
Answer» There are some ways to ASCERTAIN or observe memory leaks: -
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.
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
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. |
|