discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Running app with ARC turned off


From: Andreas Fink
Subject: Re: Running app with ARC turned off
Date: Tue, 10 Dec 2024 15:09:35 +0100

Richardo

        -fobjc-arc

is enabling ARC in clang.
If you dont pass it, it wont do ARC.


> On 10 Dec 2024, at 15:08, Riccardo Mottola <riccardo.mottola@libero.it> wrote:
> 
> 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
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]