gpt4 book ai didi

ios - 保留 NSOperation 的计数行为

转载 作者:塔克拉玛干 更新时间:2023-11-02 09:09:20 25 4
gpt4 key购买 nike

将 NSOperation 插入 NSOperationQueue 是否会增加 NSOperation 的保留计数?如果是,它什么时候会减少?

最佳答案

请阅读文档。

https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/NSOperationQueue_class/Reference/Reference.html

  • (void)addOperation:(NSOperation *)operation

Parameters

operation

The operation object to be added to the queue. In memory-managed applications, this object is retained by the operation queue. In garbage-collected applications, the queue strongly references the operation object.

Discussion

Once added, the specified operation remains in the queue until it finishes executing.

关于ios - 保留 NSOperation 的计数行为,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12070945/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com