manual-retain-release

NSOutlineView crash on Mac OS versions below 10.12 as 'stronglyReferencesItems' set to 'false' by default

两盒软妹~` 提交于 2020-04-17 22:49:05
问题 My app has an outline view which get frequent updates from server. Whenever I get an update I reload outline view. I do multiple operation with outline at the same time like showing some buttons on mouse over, expand/collapse items. For these operations I get item from outline view with NSOutlineView.item(atRow:) The issue is, at random scenarios my app is getting crashed with EXC_BAD_ACCESS (SIGSEGV) in areas where NSOutlineView internally calls NSTableView delegate methods on OS versions

Enabling in ARC in xamarin

只谈情不闲聊 提交于 2019-12-29 08:47:07
问题 Most of the security and penetration tools report if the ARC is not enabled. fobjc-arc flag is not Found As far as I know we can't do this in xamarin because we don't have build settings here. This flag can be set in build settings only. Even if we could , it won't work because xamarin uses C# and MRC to manage memory by itself. Can anybody explain me how it can be done or not done or my understanding is wrong Edit: We can turn on ARC to a full project by build settings CLANG_ENABLE_OBJC_ARC

How can I disable ARC for a single file in a project?

好久不见. 提交于 2019-12-14 02:39:01
问题 I am using ARC successfully in my project. However, I have encountered a few files (e.g., in unit tests and mock objects) where the rules of ARC are a little more fragile right now. I recall hearing that there was a way to disable ARC on a per-file basis, though I have been unable to find this option. Is this possible? How do I disable ARC on a per-file basis? 回答1: It is possible to disable ARC for individual files by adding the -fno-objc-arc compiler flag for those files. You add compiler

Is there a quick rule to know when to release Objective-C variables?

微笑、不失礼 提交于 2019-12-08 05:10:02
问题 Are there any rules of thumb when working with Objective-C that would help me understand when is the right time to release variables? 回答1: NARC! :) If you invoked a method that contains N ew, A lloc, R etain, or C opy, then you must release or autorelease . Otherwise you don't touch it. Of course, anything the documentation explicitly says trumps this rule. The other thing is that when you're dealing with C function the NARC rule still applies, but also gets the Create rule: if the function

Enabling in ARC in xamarin

谁说胖子不能爱 提交于 2019-11-29 14:38:58
Most of the security and penetration tools report if the ARC is not enabled. fobjc-arc flag is not Found As far as I know we can't do this in xamarin because we don't have build settings here. This flag can be set in build settings only. Even if we could , it won't work because xamarin uses C# and MRC to manage memory by itself. Can anybody explain me how it can be done or not done or my understanding is wrong Edit: We can turn on ARC to a full project by build settings CLANG_ENABLE_OBJC_ARC=YES But there is no way to do this in xam studio ... setting the value in mtouch also throws error Add

How can I disable ARC for a single file in a project?

邮差的信 提交于 2019-11-26 01:17:48
问题 I am using ARC successfully in my project. However, I have encountered a few files (e.g., in unit tests and mock objects) where the rules of ARC are a little more fragile right now. I recall hearing that there was a way to disable ARC on a per-file basis, though I have been unable to find this option. Is this possible? How do I disable ARC on a per-file basis? 回答1: It is possible to disable ARC for individual files by adding the -fno-objc-arc compiler flag for those files. You add compiler