What does @escaping mean on a closure parameter and when do you actually need it?
Explain why Swift split escaping and non-escaping closures — lifetime, performance, and retain-cycle safety — then cover @autoclosure, trailing syntax, and @Sendable
Tag
Start from this tag, then add more in the filter bar to narrow further. The URL keeps your choices so you can bookmark or share the same view.
Explain why Swift split escaping and non-escaping closures — lifetime, performance, and retain-cycle safety — then cover @autoclosure, trailing syntax, and @Sendable
Walk through Swift Dictionary as a CoW hash table — hashing invariants, collisions, complexity traps, nil removal, ordering, concurrency, and key design for senior interviews
Compare Dictionary and NSCache on one concrete example, an image cache for a photo feed, and show where the two diverge on thread safety, automatic eviction, and key and value rules
Demonstrate Copy-on-Write with a value-typed linked list that shares storage on assignment and copies it only when a mutation occurs using isKnownUniquelyReferenced.
Under ARC, strong keeps an object alive, unowned tracks a direct non-owning pointer that must outlive use, and weak goes through a side table so access can become nil after deinit
Define retain cycles in ARC terms, show the most common ways teams create them, and explain how to prevent and debug them in production code
Explain MemoryLayout, padding, alignment, and stride; show why stored-property order changes a struct's footprint; and connect it to arrays, performance, and low-level interop