objective c - BAD_ACCESS error -
in h file have
@property __strong ghost* **gameboard;
and initialized in m file this
sharedengine.gameboard = (ghost* __strong** )malloc(sizeof(ghost**) * [levelmanager sharedmanager].selectedlevel.fieldrowsnumber); for(int = 0; < [levelmanager sharedmanager].selectedlevel.fieldrowsnumber; i++ ) { sharedengine.gameboard[i] = (ghost* __strong*)malloc(sizeof(ghost*) * [levelmanager sharedmanager].selectedlevel.fieldcolumnsnumber); }
have done wrong because having bad_access crashes.
Comments
Post a Comment