Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pointer to non-const type Tile * with no explicit ownership

I am trying to enable arc in my application but when xcode check my project then it is giving one error on given below line.

Tile ***grid;

Error: pointer to non-const type Tile * with no explicit ownership.

Please guide me how to solve this problem.

like image 460
Iqbal Khan Avatar asked Mar 05 '13 12:03

Iqbal Khan


1 Answers

ARC cannot infer what storage type it should use. So you have to tell it!

    Tile * __strong **grid; // Strong reference to grid

    Tile * __weak **grid; // Weak reference to grid

More about strong and weak references can be found here

like image 142
Daij-Djan Avatar answered Oct 01 '22 16:10

Daij-Djan