簡體   English   中英

自動引用計數不會釋放calloc

[英]Automatic Reference Counting is not releasing calloc

in my application, for encoding the string i am using使用ARC in my application, for encoding the string i am using而我在配置文件中運行該應用程序時卻in my application, for encoding the string i am using calloc`,它顯示了calloc內存泄漏。

在此處輸入圖片說明

ARC是否會釋放calloc

如果沒有,為什么它不釋放以及如何釋放calloc

謝謝,

不幸的是,ARC僅管理Objective-C對象的內存,因此在這種情況下,您必須自己處理內存管理。

要“釋放”已調用的內存,您需要在不再使用它時對其進行free調用:

free(strResult);

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM