adspace
Why do you generally create a weak reference when using self in a block?
Answer Posted / Puja Rastogi
When using 'self' inside a block, it is generally advisable to create a weak reference to avoid a strong retain cycle. A strong retain cycle can cause memory leaks as the block retains the object, and the object in turn retains the block, preventing their deallocation.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Why do all model object attributes get marked with @dynamic and not synthesised? What does @dynamic mean?
What are the different store migration options? How do they work?
What are transient properties?
What is latest xcode version?
What's the latest version of ios?
How to handle concurrency problems in core data?
What is dependency management tools?
What is latest version of ios?
What is the purpose of reuseidentifier?
Why do all model object attributes get marked with @dynamic and not synthesised?
What is latest ios version?
Explain parent-child context setup. How does it work? What are the advantages?
What is nsmanagedobjectcontext? What are the different concurrency types? Explain them.
In a single model, can I have few entities in one sqlite db file and remaining in another sqlite db file?