1

what will happen if weak variable is assigned to strong variable . Will the strong gets released when weak goes out of scope , will it create a memory leak ? As per my assumption compiler will add release statement for the strong variable in ARC mode and it will not create memory leak . Correct me if I am wrong.

4

1 回答 1

0

您不会将变量分配给另一个变量,而是将变量的值分配给另一个变量。所以你的强变量将“保留”你的对象。

于 2012-10-15T12:32:49.750 回答