For any application that I have on my Mac, is there a way to tell if it was compiled with GC enabled, or if it's doing manual memory management?
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- C# GC not freeing memory [duplicate]
- back button text does not change
- garbage collection best practices
相关文章
- 现在使用swift开发ios应用好还是swift?
- Visual Studio Code, MAC OS X, OmniSharp server is
- TCC __TCCAccessRequest_block_invoke
- xcode 4 garbage collection removed?
- IntelliJ IDEA can't open projects or add SDK o
- Automator: How do I use the Choose from List actio
- Unable to process app at this time due to a genera
- How can I add media attachments to my push notific
Within the mach-o is a flag used to determine if a binary compiled with GC support, for non-GC, or mixed mode.
I don't know of anything that queries these bits via a more friendly API.
The markgc.c source within the Objective-C runtime can read said flags. You could refactor it to your needs, as desired.
Kind of curious why you need to know?
I found the answer here. Mind you that the original post is wrong, but contains a comment by Mark Rowe, an Apple engineer, that points the way.
I have re-run the
otool
commands he mentions on my machine with the current OS (10.6.4). Here's the output:Mark Rowe's explanation: