Visual Swift Memory Mastery

Introducing a visual and practical course that teaches:
  • How memory leaks happen
  • How to find them
  • How to fix them
  • And plenty of tips and tricks along the way
Introduction
Welcome!
1 min
What are Value Types and Reference Types?
1. Memory Basics
4 mins
2. Value Types
1 min
Playgrounds: Value Types
8.43 KB
Word Review: Value Type
330 KB
3. Reference Types
2 mins
Playgrounds: Reference Types
8 KB
Word Review: Reference Type
355 KB
4. Demonstration: Value Types & Reference Types in Xcode
4 mins
5. Summary
1 min
Swift Language Reference: Value and Reference Types
Remember This!
172 KB
Easily Find Leaks and Fix Them with This Little-known 2-Step Method
Memory Leaks Introduction
1 min
What You are Going to Learn
1 min
Removing Reference Types from Memory
3 mins
Automatic Reference Counting (ARC)
2 mins
Demonstration: ARC
3 mins
Word Review: Allocate
289 KB
Word Review: Deallocate
312 KB
Word Review: Initialization
303 KB
Word Review: Deinit
280 KB
Dependencies: Children Can Cause Trouble
2 mins
Demonstration: Dependencies
4 mins
Sad Orphans
4 mins
Demonstration: Retain Cycles
2 mins
Using Instruments: Leaks Profiler
4 mins
How to Fix a Retain Cycle with the 2-Step Method
4 mins
Demonstration: Fixing Retain Cycles
3 mins
Playgrounds with Retain Cycle
1 KB
Overview of the Strong, the Weak and the Unowned
2 mins
Examples of the Strong, the Weak and the Unowned
3 mins
Would You Rather Be Weak or Unowned?
1 min
Playgrounds: Create Retain Cycles
8.14 KB
Word Review: Retain Cycle
354 KB
Section Summary
2 mins
Remember This!
502 KB
Finally Understand What Closures Are and How to Fix Memory Problems They Are Creating in Your App Right Now
Introduction
1 min
What is a Closure?
3 mins
Demonstration
3 mins
Closures are Reference Types
3 mins
Word Review: Closure
324 KB
Capturing Values
3 mins
Capture Lists
1 min
Demonstration
1 min
More on Capture Lists
2 mins
Word Review: Capture List
317 KB
Summary
1 min
Remember This!
Introduction: Never Get Surprised by These Common Memory Problems Again
Introduction
1 min
What You Will Learn
1 min
Reusable Popup Project
143 KB
Beware of Notification Center Closures!
Overview
6 mins
Solution with Weak
2 mins
Solution with Capture List
2 mins
Avoid Extras in Memory
4 mins
Remember This!
Callbacks Can Be Your New Best Friend but Make Sure You Do This One Thing to Avoid Memory Leaks
Overview
3 mins
Solution with Weak
1 min
Solution with Capture List
2 mins
Solution with Nil
1 min
Remember This!
Summary of Solutions
1 min
Learn the Most Common Practice When Working with Delegates
Overview
5 mins
Solution with Weak
5 mins
A Weaker Solution
1 min
Solution with Nil
2 mins
Summary of Solutions
1 min
Remember This!
Summary: Now You Know More than 85% of all iOS Developers!
Swift Memory Mastery Summary
2 mins
Questions and Answers
Which property in this class could cause a retain cycle and why?
240 KB
What are the 2 steps to fixing a retain cycle?
257 KB
The weak and unowned keywords prevent automatic reference counting (ARC) from incrementing the reference count. True or False?
269 KB
The variable "theView" will be: Strong, Weak or Unowned?
277 KB
Value types such as Int, String, Bool, Array, Dictionary, can cause retain cycles.
251 KB
BONUS Interview Preparation with Memory Questions
JobInterviewPractice.mp4
7 mins
A Deeper Look Into Memory
Where are objects stored?