macdriver
macdriver copied to clipboard
retain or not
Hi thanks for the awesome package. I have some questions about the example: pomodoro. the source snippets
obj := cocoa.NSStatusBar_System().StatusItemWithLength(cocoa.NSVariableStatusItemLength)
obj.Retain()
and
itemNext := cocoa.NSMenuItem_New()
they all about create instance, why the first one need retain, but the second one is NOT, if the first ONE is about MRC and the second is about ARC, why there is no release for the first one, thanks
still trying to figure out the subtleties of making the two memory managers work together. only reason Retain was added in that demo was because otherwise it would get cleaned up too early on the objc side somehow.