Daniel Santos
> On 10 Dec 2024, at 14:08, Riccardo Mottola <[email protected]> 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 > NeXTStep 3.3 on black hardware. I am handling the differences with the preprocessor (basically #ifdef <a defined value>) Most of the code is the same as I only use NSString, NSDictionary, NSArray (and the mutable subclasses) etc Its the imports that are mostly different. > > 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
