Multiple choice technology

Which keyword should be invoked upon assignment to take the ownership of the object

  1. assign

  2. retain

  3. readwrite

  4. copy

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The 'retain' keyword is used to claim ownership of an object upon assignment. This increments the reference count, ensuring the object stays in memory. Assign doesn't claim ownership, readwrite is about accessor generation, and copy creates a new instance.