Garbage Collection and AppStore

Does Xojo uses garbage collection?
From 1 may 2015 it is not allowed anymore when you want to release your app on the AppStore.

See link:
http://appleinsider.com/articles/15/02/20/apple-says-mac-app-makers-must-transition-to-arc-memory-management-by-may

Christoph - there are 2 other threads on this subject, you may want to repost there - although I believe this issue has been answered, and we seem to be ok :slight_smile:

https://forum.xojo.com/20220-garbage-collection-apps-must-move-to-arc

https://forum.xojo.com/20216-arc-memory-management

Xojo uses reference counting; all is okay.

But how about MacOSLib? I haven’t checked the recent version but at least until shortly they used a lot of unnecessary and deprecated retain/release calls.

Macoslib doesn’t use Objective-C garbage collection and those retain/release calls are almost certainly necessary and aren’t deprecated.

That’s manual reference counting. It’s fine. It’s pretty much what ARC is doing for you, behind the scenes - it’s inserting those retain/release calls for you.

It’s garbage collection in apps that is a no-no for the App Store now.

Ah, ok. From the graphics in Christoph’s link it looks like they don’t want that lot of retain and release calls in their apps anymore.

As written in another thread: I use own implementations of OS X controls which don’t call retain and release. I just pin their handle to a Xojo Ptr and they live as long as that one is alive, without memory leaks or exceptions. And on NSObject docs retain and release are listed as obsolete methods. I have the feeling that Xojo’s arc translates nicely to the Cocoa API – but surely I cannot say if I missed something. After a few months of handling declares this way I could find no problems.

EDIT: But I just found this on the Apple notes: Apps may continue to use retain/release for manual memory management.
So no problem with MacOSLib. Phew!