Câu hỏi phỏng vấn Objective-C
Câu hỏi

What is @auto...

Câu trả lời

@autoreleasepool in Objective-C

@autoreleasepool is a language construct in Objective-C that helps manage memory by creating an autorelease pool block. It is used to group a set of autoreleased objects together, allowing them to be released all at once when the pool is drained.

In Objective-C, when an object is created with the alloc or new methods, it is assumed that the object will be retained by the calling code. However, when an object is created using the autorelease method, it is assumed that the object will be released at some point in the future, but the exact time is not specified.

The @autoreleasepool block is used to create a new autorelease pool and associate autoreleased objects with it. When the @autoreleasepool block is exited, either by reaching the end of the block or by using a ...

senior

senior

Gợi ý câu hỏi phỏng vấn

expert

Explain method swizzling. When you would use it?

expert

What are limitations of NSDictionary ?

middle

What is the difference between NSDictionary and NSMutableDictionary ?

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào