David House

Finding and Fixing Memory Issues

David House | Aug 27, 2018

How can I find and fix memory management problems using the Xcode Memory Graph Debugger?

Incorrectly managing memory in our applications can result in hard to find bugs and possible crashes. In this video, we will explore the Memory Graph debugging tool in Xcode and how you can use it to find and fix strong reference cycles in closures. After this video, you will be able to use the Memory debugger to identify your apps' memory performance.

We will answer these questions:

- What is the Xcode Memory graph Debugger?
- How can I find and fix memory management problems?
- How do I use the Memory Graph Debugger in my current application?

For the More Curious...

Memory Graph Debugging Documentation
BNR Guide to iOS
iOS & Swift Courses

Subscribers Only

Transcripts are for subscribers. Create an account today to access our collection of screencasts, skill packs, and more.

Subscribers Only

Project files are only available for subscribers. Create an account today to access our collection of screencasts, skill packs, and more.

Need Help?

If you get stuck, try starting a discussion with Big Nerd Ranch experts in the community tab.

iOS Debugging

This screencast is part of a skill pack called iOS Debugging.

Finding and Fixing Memory Issues

7 minutes

Incorrectly managing memory in our applications can result in hard to find bugs and possible crashes. In this video, we will explore the Memory Graph debugging tool in Xcode and how you can use it to find and fix strong reference cycles in closures.

Optional Return Values vs. Throwing

8 minutes

This video Illustrates the differences between using optional return values or throwing errors for functions that can fail. The implementations are discussed and the pros and cons of each approach are discussed.

Introduction to Breakpoints

8 minutes

A breakpoint is a debugging tool that lets you stop your application at a specific line of code. The application is suspended, allowing you to look at your program state, and collect information about whatever bug you are tracking. In this screencast, we'll talk about simple breakpoints, conditional breakpoints, and set exception breakpoints.

Generational Analysis with the Allocations Instrument

9 minutes

Generational Analysis with the Allocations Instrument can be used to track down memory growth issues. We're going to be tracking down a memory management issue that caught us here at Big Nerd Ranch by surprise, and we'll show you what we did to solve it.

Automating Breakpoint Actions

7 minutes

While we all love Caveman Debugging, professional developers know their tools inside and out. In this screencast, debugging expert Mark Dalrymple will build on his previous screencast and show you some advanced debugging techniques in Xcode.

Swift Assertions

9 minutes

In this screencast, we’ll learn how to use Swift’s assertion function to code defensively. By the end of this video, you’ll be able to use the assertion functions to help you write stronger, more robust code.

Related Screencasts

Explore other screencasts related to this topic.

Interstitial Content Markers

7 minutes

Video content frequently contains interstitial content such as advertisements or interludes. In this video we will explore the AVKit provided classes for marking interstitial points in your videos.

Looping Multiple Videos on AppleTV

11 minutes

The Apple TV can be setup as a Kiosk that plays a series of videos on a loop at a business or school location. In this video, we will use AVFoundation to allow the videos to play one after the other in an infinite loop.

Creating a State Machine using Swift Enumerations

11 minutes

As View Controllers become more complex, the need to manage the state of the view becomes more important. In this video we will discuss how to use a state machine to manage our views state.

Using Container Views to Manage Complex Layouts

7 minutes

When you have a complex view controller view, sometimes it is helpful to break up the view into manageable chunks. In this video we will show how you can use container views to simplify the construction of certain layouts. After this video you will know when and how to use these container views in your applications.

Display Step Count Using HealthKit

11 minutes

HealthKit provides iPhone users with a rich set of activity and health data that is available for applications to use. In this video, we will cover the basics of getting access to HealthKit and visualizing a users daily step count. After this video you will be able to query HealthKit data to provide your users with unique and interesting ways to see their activity and general health.

Setting Metadata for Video

7 minutes

The native video player experience on tvOS includes an information panel that provides the user with details about the currently playing video. In this video, we will discuss how to populate this metadata to make it visible to the user. After this video, you will be able to do the same in your applications.