Enable Automatic Reference Counting (ARC) for Objective-C code that needs it (#90379)
We noticed that ARC isn't enabled for System.Globalization.Native code but we aren't properly doing manual memory management by calling `release`. Enable ARC for the System.Globalization.Native ObjC code so it is handled automatically by the compiler. Disable it for System.Native code since that one is less complex and we can manually manage it. We need to wrap all public entrypoints to the library in `@autoreleasepool` blocks so that the releasing of autoreleased objects occurs at the end of the block, rather than at some undetermined point in the future (and we don't even know if we have an autorelease pool in the thread).
Showing
想要评论请 注册 或 登录