Protobuf runtime updated to optionally support ARC - how to enable?

45 views
Skip to first unread message

Jindrich Sarson

unread,
Oct 10, 2021, 10:16:51 AM10/10/21
to j2objc-discuss
Hi,

I read in latest release notes, that protobuff runtime should support ARC. Was also generator updated? It seems, that it still genereates non-arc code and I didn't find any switch to enable this.

Thanks,

Jindrich

Tom Ball

unread,
Oct 10, 2021, 1:04:53 PM10/10/21
to j2objc-...@googlegroups.com
Here's the relevant commit: 948e9a7360d009c2f01245238998887075f7a7d5

The only change necessary in the compiler was to use the AUTORELEASE macro instead of directly sending the autorelease message. We use this macro to avoid needing ARC-conditional sections everywhere; instead, just compile your j2objc_protoc-generated code with -fobjc-arc to enable this feature. 

FYI, there's no real benefit to rebuilding the j2objc protobuf runtime with ARC unless it helps you sleep at night (like the requesting engineer needed), as all reported leaks with that runtime were resolved years ago.

--
You received this message because you are subscribed to the Google Groups "j2objc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to j2objc-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/j2objc-discuss/46acffc5-24b4-404c-9528-27999e68d275n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages