p = nil
Listing 49-3, you added the weak keyword to the parent Project property. You were also able to assign the Project instance to each Task instance without creating a strong reference cycle or The output shown here would still look correct and verify that no memory leak is occurring, and you would still get the needed reference:
creating a memory leak.Cook Dinner project is being deinitialized Choose Menu task is being deinitialized Buy Groceries task is being deinitialized Prepare Ingredients task is being deinitialized Cook Food task is being deinitialized