|
From: | Riccardo Mottola |
Subject: | Re: Running app with ARC turned off |
Date: | Tue, 10 Dec 2024 15:08:47 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 SeaMonkey/2.53.19 |
Hi, Daniel Santos wrote:
I agree, but my objective is to have ARC disabled to try to reproduce the memory allocations that happen in NeXT (that does not have ARC). Meaning that with ARC disabled I will have to explicitly release objects and therefore catching memory allocation bugs that will happen on the NeXTStep version of the code.
just out of curiosity. NeXTStep or OpenStep? The former is not compatible with GNUstep, different API names and many different details, so I wonder how you can write the same code.
OpenStep instead is quite compatible.GNUstep itself doesn't need ARC and you can compile without ARC. Easy, just use the GCC runtime and so alloc/release/autorelease will do the reference counting. I don't know if you can disable ARC with clang
Furthermore for the opposite problem you can enable zombies (NSZombieEnabled env variable), as to trace access to deallocated objects. But that is the opposite of what you ask: it keeps everything "alive", but useful if you debug manual reference counting, since accessing a dead object can be hard to trace sometimes.
Riccardo
[Prev in Thread] | Current Thread | [Next in Thread] |