discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Emacs Anyone?


From: Ivan Vučica
Subject: Re: Emacs Anyone?
Date: Tue, 7 Mar 2017 14:38:56 +0000

On Tue, Mar 7, 2017 at 2:31 PM, Riccardo Mottola <address@hidden> 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


reply via email to

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