semi-localization

Hi,
I just discovered that code like this one (called in a timer every one sec), causes a major memory-leak.
At present, adding “formatter.release”, the issue disappears. But I’d like to know if there is anything wrong in the way I hand the matter.

//macOSLib 64-bit
dim formatter as new NSDateFormatter
//formatter.Locale = NSLocale.CurrentLocale
formatter.Locale = new NSLocale(myPreferredLanguage)

dim s() as String = formatter.StandaloneWeekdaySymbols

formatter.Release

Return s(idx)

macOSLib expects that you will call certain functions “at the right time” as some classes adhere to the policy of “the owner retains and releases this”
theres a document that outlines how ObjC functions are named and when the oner must retain and release things
macOSLib adheres to this as well

Thank you for the explanation.
BTW: It is not that I doubted the soundness of macOSLib’s contributors; I just wanted to be sure that what I’m doing is the right way to implement it. And from what you wrote, it seems so.