From c48907c5e07cda593e85b7f33c02de3a87ef4c8f Mon Sep 17 00:00:00 2001 From: mrgsdev <157994617+mrgsdev@users.noreply.github.com> Date: Mon, 1 Jul 2024 13:40:34 +0300 Subject: [PATCH] Update memory-management (#5992) * Update memory-management@tqbg8mBJfjuXacdMlIB_L.md --------- Co-authored-by: dsh --- .../memory-management@tqbg8mBJfjuXacdMlIB_L.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/data/roadmaps/ios/content/memory-management@tqbg8mBJfjuXacdMlIB_L.md b/src/data/roadmaps/ios/content/memory-management@tqbg8mBJfjuXacdMlIB_L.md index 0f0ebe5f9..3c703255f 100644 --- a/src/data/roadmaps/ios/content/memory-management@tqbg8mBJfjuXacdMlIB_L.md +++ b/src/data/roadmaps/ios/content/memory-management@tqbg8mBJfjuXacdMlIB_L.md @@ -1 +1,15 @@ -# Memory Management \ No newline at end of file +# Memory Management + +Memory management involves allocating memory for objects and freeing it after use. Manual Retain-Release (MRR) requires developers to explicitly manage memory using reference counting, provided by the Foundation class NSObject. Automatic Reference Counting (ARC) automates this process by inserting memory management method calls during compilation, though it still uses reference counting. In contrast, Garbage Collection (GC) automatically tracks object ownership and releases unreferenced objects, using a different mechanism than MRR and ARC, and is supported only in the Mac OS X runtime environment, not on iOS. + +> Beginning May 1, 2015, new Mac apps and app updates submitted to the Mac App Store may no longer use garbage collection, which was deprecated in OS X Mountain Lion. Instead, migrate your apps to Automatic Reference Counting, using the migration assistant in Xcode to help with this transition. Apps may continue to use retain/release for manual memory management. For more information, read the [Transitioning to ARC Release Notes](https://developer.apple.com/library/ios/releasenotes/ObjectiveC/RN-TransitioningToARC/Introduction/Introduction.html). + +Visit the following resources to learn more: + +- [@official@WWDC2021: ARC in Swift: Basics and beyond](https://developer.apple.com/videos/play/wwdc2021/10216/) +- [@official@ARC(Automatic Reference Counting)](https://docs.swift.org/swift-book/documentation/the-swift-programming-language/automaticreferencecounting/) +- [@official@About Memory Management](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/MemoryMgmt.html) +- [@official@Mac Apps That Use Garbage Collection Must Move to ARC](https://developer.apple.com/news/?id=02202015a) +- [@official@MemoryLayout](https://developer.apple.com/documentation/swift/memorylayout) +- [@official@Detect and diagnose memory issues](https://developer.apple.com/videos/play/wwdc2021/10180/) +- [@official@ WWDC24: Analyze heap memory](https://www.youtube.com/watch?v=X_JYRz-Hd0o)