On Tue, Mar 7, 2017 at 2:31 PM, Riccardo Mottola <[email protected]
> wrote:

> Hi Ivan,
>
> Ivan Vučica wrote:
>
>> Assuming this is an ObjC module, and assuming the warning did NOT come
>> from GSInitializeProcess():
>> Below GSInitializeProcess() add [NSAutoreleasePool alloc].
>>
>
> I think this is somehow dirty?


It's very dirty!

But thinking about it, it's probably sufficiently correct. Once you get
into the main loop, the Openstep/Cocoa/GNUstep port of Emacs probably
already has an ARP that it allocates and drains. Maybe it even relies on
*step events, like a proper port should? In which case you just need one to
cover you until the main loop.


> If the same code on systems where no fake main is required works and there
> are no issues with ARPs, my guess is that GSInitializeProcess() is not
> enough for me, that something else is needed.


> Also, it doesn't work :) I inserted the AutoreleasePool alloc right after
> process initialize.
>

Reading back, of course, my ObjC is sufficiently rusty that I forgot the
call to -init. :)

As a sanity check, you've done [[NSAutoreleasePool alloc] init]; and not
just an +alloc like I mistakenly suggested? :)

(Or [NSAutoreleasePool new], of course).


>
> Maybe Richard has a better hint.
>
> Riccardo
>
_______________________________________________
Discuss-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to