Skip to content
115: Do the Weak-Strong Dance episode artwork

EPISODE · Jul 27, 2016 · 56 MIN

115: Do the Weak-Strong Dance

from iOhYes · host Darryl Thomas & John Sextro

Discussion - Allocations and Leaks instruments Extraordinarily hard to spot Tough to find offending code without help from tools Unbounded Memory Growth (memory growth without a chance to collect (deallocate) memory True Leaks (retain cycles) Allocations Generation Analysis Tracks allocations still resident when the generation is marked - As you do multiple generations you will see only the new allocations since the last generations Simulate Memory Warning (did it help, do you have anything observing for this?) I have unbounded memory growth, now what? - Look for the biggest offenders (sorting) - Drill into the code and look for ways to release unnecessary allocations Good ‘ol fashion memory management If you’re intentionally holding onto objects, consider implementing an observer for UIApplicationDidReceiveMemoryWarningNotification to release them Leaks / Retain Cycles aka. Strong Reference Cycles Persistent vs. Transient Static Code Analyis Narrow list to your code Use / Observe (detective work) “You’re in the ballpark” now what? Reference counting Weak and Unowned Closure example with capture list; weak and unowned Apple says, “Use a weak reference whenever it is valid for that reference to become nil at some point during its lifetime. Use an unowned reference when you know that the reference will never be nil once it has been set during initialization.” Picks Darryl Visual Debugging with Xcode WWDC 2016 Session 410 demonstrates the use of the new Memory Graph Debugger starting at about 24 minutes in John "Weak, Strong, Unowned, Oh My!" - a Guide to References in Swift by Hector Matos

Episode metadata supplied by the publisher feed · Published Jul 27, 2016

Embed this episode

Ready to play

115: Do the Weak-Strong Dance

0:00 56:30

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

No similar episodes found.

No similar podcasts found.

Frequently Asked Questions

How long is this episode of iOhYes?

This episode is 56 minutes long.

When was this iOhYes episode published?

This episode was published on July 27, 2016.

Can I download this iOhYes episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.
URL copied to clipboard!