[Top][All Lists]

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

Re: Volunteering to help on etc/TODO item: Improved xwidgets support

From: Daniel Martín
Subject: Re: Volunteering to help on etc/TODO item: Improved xwidgets support
Date: Thu, 20 Oct 2022 13:13:17 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (darwin)

Andrew De Angelis <bobodeangelis@gmail.com> writes:

> Great, thanks Qiantian for the info.
> I'm looking into ways to adapt the Objective C code to use manual reference
> counting rather than ARC. Is this a problem that other Objective-C Emacs
> files have? Maybe I can also come up with some general rules/approaches to
> help people fix the problem in other files.
> One thing that would be very helpful is if you (or anyone else) is aware of
> somebody making this fix (ARC -> MRC in Objective C) before: most of the
> tutorials/documentation I'm finding on the topic is on how to go in the
> opposite direction, which is helpful information but I'm stuck "reverse
> engineering" the whole approach.

I'd also suggest instrumenting Emacs with Instruments.app and the
"Leaks" profile.  The generated profile will indicate if there are
retain/release/autorelease problems that led to leaked objects under
the MRC model.

In recent versions of macOS you might have problems running Emacs under
Instruments.app.  One way to resolve this problem is by embedding a
custom entitlement that sets "com.apple.security.get-task-allow" and
then signing the binary again.  That is, run this command from a shell:

$ codesign -s - -v -f --entitlements Entitlements.plist emacs

In the command above, "emacs" is the built Emacs binary and
Entitlements.plist should contain this text:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" 
<plist version="1.0">

I suspect this tweak could perfectly be part of the Emacs build system
for NS, but I haven't investigated further.

reply via email to

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