[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ARC & Autorelease pool question
From: |
Andreas Fink |
Subject: |
ARC & Autorelease pool question |
Date: |
Mon, 13 May 2019 09:59:34 +0300 |
Hello all
I am chasing a memory leak in my application and came to the conclusion that my
code is not leaking anything but most probably is gnustep-base adding stuff to
the autoreleasepool which never gets flushed. My understanding of ARC however
was that the autorelease pool mechanism is kind of obsolete now as objects
automatically get tossed when there's no reference of it. So a method returning
an object will return a non released object. Thats why my code has nowhere any
autorelease call.
However if gnustep base still adds object for legacy reasons to the pool, I
must flush it every once in a while. The problem I'm having is that I have
massive multithreaded code and absolutely nothing happens in the main event
loop except waiting for a shutdown signal.
My question is simple: What is the correct way to compile gnustep-base with ARC
so it wont even use autorelease pools at all. Or is this not possible?
I now populated my code with massive amounts of @autorelease { ... } in the
meantime but I consider this ugly.
Andreas
- ARC & Autorelease pool question,
Andreas Fink <=