Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var panel = NSColorPanel.SharedColorPanel;
panel.AttachColorList(colorList);
foreach (var defaultColorList in NSColorList.AvailableColorLists)
{
#if UNIFIED
System.Diagnostics.Debug.WriteLine(defaultColorList.Name + " RetainCount: " + defaultColorList.RetainCount);
endif
panel.DetachColorList(defaultColorList);
#if UNIFIED
System.Diagnostics.Debug.WriteLine(defaultColorList.Name + " RetainCount: " + defaultColorList.RetainCount);
defaultColorList.DangerousRetain(); // <-----------
System.Diagnostics.Debug.WriteLine(defaultColorList.Name + " RetainCount: " + defaultColorList.RetainCount);
endif
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment