[英]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.