SBJson - is there a memory leak?

I just cloned the git repository for the SBJson environment and imported the source code into my application. I ran into a static memory profiler and got a little scared of the results that I saw. See Image

enter image description here

How is this possible? I doubt that the developer of this very famous library did not see this? Indeed, if you run a memory profile, it displays memory leaks from this library.

Any ideas? thanks

+6
source share
1 answer

It looks like you are using SBJSON in a project that does not have ARC . Because ARC eliminates the need to call release directly, code written for ARC (such as SBJSON) causes a memory leak when used in a project other than ARC. You must convert your project to ARC with the built-in refactoring tool (Edit> Refactor> Convert to Objective-C ARC, then explicitly set the -fno-objc-arc compiler flag to any of your sources that is not yet ready for ARC.

+8
source

Source: https://habr.com/ru/post/911590/


All Articles