Retain Cycles: How to Detect with Instruments Profiler!

  Переглядів 47,966

Lets Build That App

Lets Build That App

День тому

Retain cycles are one of those pesky little bugs that can totally derail your app development process. In today's quick lesson, I'll go through how you can use Instruments Profiler to detect retain cycles. But before we do that, we actually have to create a retain cycle as a demo to showcase how this works. Enjoy.
Tinder Firestore Swipe and Match
www.letsbuildthatapp.com/cour...
Twitter Slide Out Menu Course
www.letsbuildthatapp.com/cour...
Podcasts Course
www.letsbuildthatapp.com/cour...
Intermediate Training Core Data
www.letsbuildthatapp.com/cour...
Instagram Firebase Course
www.letsbuildthatapp.com/cour...
Facebook Group
/ 1240636442694543
Instagram: / buildthatapp
Twitter: / buildthatapp
Hackintosh Build
i9 9900k: amzn.to/2CvQj6v
ASUS Z390 Motherboard: amzn.to/2JpaQ2B
16GB Corsair Vengeance RGB RAM: amzn.to/2YbygvJ
Corsair H100i Platinum Water Cooler: amzn.to/2FnbM22
Thermaltake RGB Power Supply: amzn.to/2TgKDTu
Intel 1TB SSD: amzn.to/2Tkdk1V
Corsair 280x Computer Case: amzn.to/2WcjvH2
AMD Radeon 4GB RAM GFX Card: amzn.to/2TYMyAp
LG 34" Widescreen 3440 x 1440: amzn.to/2Tk7q0S
Rode NT1 Microphone: amzn.to/2TZgX1r
Focusrite Audio Interface: amzn.to/2U12gey
Panasonic GH4 DSLR: amzn.to/2U4BrG6
Magewell HDMI to USB3 Capture Card: amzn.to/2Jp2esI

КОМЕНТАРІ: 81
@sejdemi
@sejdemi 5 років тому
You are the mentor I always wish I had. I've learned more from you than from senior developers at places I've worked at. Thank you so much!
@nelglezmusic
@nelglezmusic 5 років тому
So glad you covered this topic. Thanks Brian!
@christostsangaris4785
@christostsangaris4785 5 років тому
What a valuable video! It took me a week to solve a retain cycle issue back in March 2018! That was the exact procedure i followed to fix it!
@mike_thecatlover
@mike_thecatlover 5 років тому
Another video much more than what I expected to learn with than video time. This 14 minutes video covered a lot helpful stuff and vert concise. I ever watch another half an hour video regarding dealing with memory leak with instrument, not sure what learned after half an hour. Again, thanks Brian, and i gave a thumb up for every video I watched!
@srsh12345
@srsh12345 5 років тому
Great video. So grateful to see a breakdown on this subject.
@ShubhamGupta-qo2pt
@ShubhamGupta-qo2pt 5 років тому
These small closures, make developers think more practically. Great Going "Let's Build That App". Happy New Year Too..
@Zainanjum100
@Zainanjum100 5 років тому
you always come up and make our life easy by demonstrating something very use full, thanks a lot.
@RohitPatil_Tech
@RohitPatil_Tech 3 роки тому
Hey Brian, This was a very clear explanation on an important topic. Thanks!
@vladimirinoz
@vladimirinoz 3 роки тому
Thank you for simple explanation of the complicated topic
@anupamkumarlal7104
@anupamkumarlal7104 4 роки тому
Thanks for sharing such a wonderful video. Helps a lot.
@shashivendrasinghsengar792
@shashivendrasinghsengar792 2 роки тому
great video and this is helpful for junior and senior developers also . thank you so much for sharing
@MrQouTube
@MrQouTube 5 років тому
Thanks! Didn't know about this tool before.
@ulquiorramax1749
@ulquiorramax1749 5 років тому
Hey Brian, great video for introducing us with leak profiler. It will be great if you make a tut about LLDB. Wish you a happy new year. :)
@josefsantamaria
@josefsantamaria 5 років тому
Very helpful with explanations like this!
@nick0hunterx
@nick0hunterx 5 років тому
Thanks for your video.... simple but very helpful..
@AlbrectsenTube
@AlbrectsenTube 5 років тому
Appreciate the topic a lot! This is not just how to render a view on the screen but actually performance optimization on highest level! Love it! More of it! Love you Brian!!!
@giovanniarturo893
@giovanniarturo893 2 роки тому
You probably dont care but if you guys are bored like me atm you can watch pretty much all of the new series on instaflixxer. I've been watching with my girlfriend these days xD
@kanedillon4107
@kanedillon4107 2 роки тому
@Giovanni Arturo definitely, been watching on KaldroStream for years myself :)
@zeeshanahmed3716
@zeeshanahmed3716 5 років тому
really helpful for me ....great stuff keep it up
@taylormaxwell1277
@taylormaxwell1277 4 роки тому
This was very helpful and clear
@SudhanshuSrivastavaIndia
@SudhanshuSrivastavaIndia 5 років тому
Wonderful as always.
@ewekalane
@ewekalane 5 років тому
Thanks! Nice tutorial.
@julyanfarias
@julyanfarias 5 років тому
Amazing Brian!
@pradeepsagar4312
@pradeepsagar4312 4 роки тому
Thanks a lot. Great tutorial :)
@cinquain0
@cinquain0 5 років тому
That video was fire!
@vamsi3877
@vamsi3877 5 років тому
Very helpful 🤗🤗
@ayon3527
@ayon3527 5 років тому
Nice demonstration, tx man. What was the tool you were using for drawing the boxes??
@LetsBuildThatApp
@LetsBuildThatApp 5 років тому
It's called PMouse. You can download from Appstore, its not cheap but definitely very useful.
@ANILKUMAR-vv1fz
@ANILKUMAR-vv1fz 4 роки тому
Awesome Video
@dilsmatchanov
@dilsmatchanov 5 років тому
Yeah! Diagrams really help. BTW when is your twitch stream going to be?
@LebenWerden
@LebenWerden 3 роки тому
Hello, thank you for this video. I have a question about the Developer Documentation. Is there a way to make marks in the documentations? Like if you make colored marks in a book.
@ignaciohernandezpina
@ignaciohernandezpina 5 років тому
Nice video. Thankyou
@KhoaNguyen-rf9nv
@KhoaNguyen-rf9nv 5 років тому
Fantastic
@mubin986
@mubin986 5 років тому
Amazing video!! Brain, what is the name of that painting tool you used in this video?
@LetsBuildThatApp
@LetsBuildThatApp 5 років тому
pmouse, not free though.
@eleev_
@eleev_ 5 років тому
Great video! There is an another way to detect retain cycles without launching Instruments app. All you need to do is to take a memory snapshot of your current, active application’s session right from the Xcode ( there is a dedicated button, on top of the console/debugger panel). There will be a cycled graph if you browse different software entities. The method is less informative IMHO, but once you get familiar with it, it will become a very powerful tool in your toolbox. Also, “malloc scribble” option needs to be turned on in project configuration settings, in order to be able to capture certain memory “situations” and be able to actually capture memory leaks. I’m sure many of you know this method, my apologies if it sounds too complex or confusing. Just wanted to leave it here as a reference. 😉
@DancesWithDingo
@DancesWithDingo 5 років тому
Do you have any suggestions for getting the stack trace to show up? It seems most of the time I go to use this tool that there is no stack trace presented.
@rrakesh05
@rrakesh05 5 років тому
superb...
@sohailurrahmans2530
@sohailurrahmans2530 3 роки тому
Hey I like your tutorials very much. You are one of the best. Can you suggest me how to get OBJECT CODE for an iOS project. This is for copywriting an iOS application. Not sure how I can get an OBJECT CODE(Compiler code) for a ios app
@IsraelMeshileya
@IsraelMeshileya 5 років тому
Great 👍
@loganhsiao3347
@loganhsiao3347 3 місяці тому
Appreciate a lot! I doing the same thing, but there are still no leaks red checkmark showing up. why?🤔 My Xcode version is 15.0.1.
@khushbookumari5154
@khushbookumari5154 2 роки тому
I am getting failed to attach target in instruments. Any suggestion for that is appreciated.
@YogeshPateliOS
@YogeshPateliOS 5 років тому
Hey, Can You Please tell me the name of that tool that you use for draw a diagram .? Thank You Well Superrb Video big fan of yours 😀
@srikanthgali9615
@srikanthgali9615 3 роки тому
big fan of @Yogesh here :)
@sukshithshetty4847
@sukshithshetty4847 3 роки тому
Big fan sir, love your style of teaching swift iOS. May I please know in which company you work in???
@rickisyourbro
@rickisyourbro 5 років тому
I really like the intro music. Very 迷幻
@LetsBuildThatApp
@LetsBuildThatApp 5 років тому
听起来特别舒服
@user-ei1pb6mo1i
@user-ei1pb6mo1i 2 роки тому
What is the name of the tool to draw right on the screen?
@VinaMelody
@VinaMelody 2 роки тому
2 years later, still one of the most relevant explanation :)
@fortyfour7410
@fortyfour7410 5 років тому
What is the drawing tool pls? Needed this to teach my class as well
@LetsBuildThatApp
@LetsBuildThatApp 5 років тому
It's called PMouse.
@ChristopherCricketWallace
@ChristopherCricketWallace 2 роки тому
This video show how to create and avoid retain cycles and how to turn on the Instruments panel. It doesn't show to actually use the Instrument panel to find the code that's producing the memory leak. Sure we see a red diamond that says there is one; but how should we use that interface for more specific details?
@fakhryfauzan8677
@fakhryfauzan8677 4 роки тому
i still don't get it about this course, when i used weak var, and run the profiler, the leaks still up in 10 seconds of testing.. and going grey after 10 seconds of testing. and still same when i didn't use weak.
@Oscar-ig2gm
@Oscar-ig2gm 5 років тому
Hello, I wanted to buy one of your courses, but there is a mistake, maybe because I'm from Kazakhstan, how can I solve this problem?
@Oscar-ig2gm
@Oscar-ig2gm 5 років тому
I solved this problem, I did not allow Internet payment), sorry and thank you for everything
@oscara9709
@oscara9709 4 роки тому
Why instruments doesn't allow me to do a thing? The record button is disabled. :( Xcode 11.4
@DaLakersFan24
@DaLakersFan24 3 роки тому
Keep making these videos man, YT is full of trash and your educating people
@gokhanaydn7570
@gokhanaydn7570 5 років тому
Hi Brain, UIKeyboardPredictionView that belongs system library UIKitCore, causes memory leak. If you can check it out in your next videos, I will be so happy. Thanks a lot for your great videos...
@nurlanakylbekov7266
@nurlanakylbekov7266 3 роки тому
I did exactly the same what he did, but I always had green color with "No leaks". Xcode 12.4
@prdpshkya
@prdpshkya Місяць тому
same for me also.
@kjbriyan9124
@kjbriyan9124 5 років тому
Hello brian, i want ask, how to use file fbx in android studio?
@LetsBuildThatApp
@LetsBuildThatApp 5 років тому
Whats a file fbx?
@kjbriyan9124
@kjbriyan9124 5 років тому
@@LetsBuildThatApp FBX is file 3D animation
@LetsBuildThatApp
@LetsBuildThatApp 5 років тому
I see, how do you use that kind of file?
@kjbriyan9124
@kjbriyan9124 5 років тому
Lets Build That App i want show the file. I want make app dictonary for disability and the animation show language for disabilty. Animation is actor
@kjbriyan9124
@kjbriyan9124 5 років тому
Lets Build That App like image with picaso. just want load fbx and show
@EulerAlvarenga1
@EulerAlvarenga1 5 років тому
1st one =)
@smackaroony
@smackaroony 5 років тому
2019 is u
@AzwinBGMs
@AzwinBGMs 5 років тому
Nice, please create a ecomerce website with codeigniter. Please sir, i am waiting for it.
@LetsBuildThatApp
@LetsBuildThatApp 5 років тому
Codeigniter is PHP right? This language strikes fear in my heart.
@aafaqahmed2265
@aafaqahmed2265 3 роки тому
while(true){ print ("❤️") }
@tgsoon2002
@tgsoon2002 4 роки тому
Show how to use instruments 10:15
@shoebmoin10
@shoebmoin10 5 років тому
Aaayyyyy
@nick0hunterx
@nick0hunterx 5 років тому
Thanks for your video.... simple but very helpful..
@nick0hunterx
@nick0hunterx 5 років тому
Thanks for your video.... simple but very helpful..
Weak and Unowned Self Closure Memory Leak Fixes
12:21
Lets Build That App
Переглядів 55 тис.
Apple Debugging L9 - Instruments Time Profiler
26:54
AppleProgramming
Переглядів 14 тис.
одни дома // EVA mash @TweetvilleCartoon
01:00
EVA mash
Переглядів 3,6 млн
Memory Leaks in iOS: Find, Diagnose, & Fix (2022)
12:44
iOS Academy
Переглядів 44 тис.
How to spot and fix memory leak, retain cycle and erratic crashes
25:14
Swift Grouped Messages: Easy Auto Sizing Cells (Ep 1)
27:12
Lets Build That App
Переглядів 49 тис.
Apple Debugging L5 - Memory Graph
18:01
AppleProgramming
Переглядів 13 тис.
Big Tech AI Is A Lie
16:56
Tina Huang
Переглядів 53 тис.
When to Semaphore vs Dispatch Group! Careful Multithreaded Shared Resource
11:11
Lets Build That App
Переглядів 45 тис.
5 SwiftUI Features You (Probably) Didn't Know!
7:59
Flo writes Code
Переглядів 3,9 тис.
Here's the ULTIMATE tip to find memory leaks in Xcode!
5:41
Vincent Pradeilles
Переглядів 12 тис.