开发者

Allocation and deallocation of an object [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 11 years ago.

I created

object *Obj = [[Obj alloc] init];

What happened? After I release it, the object is dealloc开发者_如何学Pythonated.Then what happens?

If I try to create the object again, what will happen?


After alloc+init you can use your object Obj.

After releasing you cannot use it.

When you will try to create object again, new part of memory will be allocated and you can use it again.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜