Retain cycles are one of the most common ways of creating memory leaks. It's incredibly easy to create a retain cycle, and tends to be hard to spot it. The goal of FBRetainCycleDetector is to help find retain cycles at runtime. The features of this project were influenced by Circle. FBRetainCycleDetector will look for cycles that are no longer than 10 objects. We can make it bigger (although it's going to be slower!). There could also be retain cycles that we would like to omit. It's because not every retain cycle is a leak, and we might want to filter them out. Every filter is a block that having two FBObjectiveCGraphElement objects can say, if their relation is valid. If you want to profile your app, you might want to have an abstraction over how to get candidates for FBRetainCycleDetector. While you can simply track it your own, you can also use FBAllocationTracker. It's a small tool we created that can help you track the objects.

Features

  • FBRetainCycleDetector is built out from non-debug builds
  • You'll be able to use FBRetainCycleDetector fully only in Debug builds
  • Controlled by compilation flag that can be provided to the build to make it work in other configurations
  • FBRetainCycleDetector will look for cycles that are no longer than 10 objects
  • Track all allocations and force retain cycle detection from UI

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

BSD License

Follow FBRetainCycleDetector

FBRetainCycleDetector Web Site

You Might Also Like
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of FBRetainCycleDetector!

Additional Project Details

Operating Systems

Apple iPhone

Programming Language

Objective C

Related Categories

Objective C Libraries

Registered

2022-01-28