GC vs RC compared?

There is a discussion about “Best Way To Destroy An Object” on Xojo Programming Forum.

Sam Rowland wrote:

In a video editing app I worked on, we found using GC and periodic flushing was
the most performant. RC was too slow, and waiting to flush once processing
ended, became very slow, as it pushed the app into VM, and at that point…
well… Mac SSD speeds were atrocious.

How does Xojo handle reference counting? I would not expect it to be so slow compared to GC with periodic flushes. 8th uses memory pools and consumed items go into pool’s free list. New items will be allocated from the pool’s free list.

Xcode: Depends on which language you use.

In Objective-C you can use either or. “Retain and Release” are used for Reference counting. Certain Apple API that has “Copy” or “Create” in their name, provides an object that’s already been retained and you need to release it when you’re done.

There’s also “autoRelease”, which puts the object into the AutoReleasePool, that periodically gets flushed. You can create your own AutoReleasePool and flush it when you need.

What I found was to use a AutoReleasePool, push objects to it, than after processing 10 or so frames, flush the pool… This was quicker than releasing each frame after I’d used it, it was also quicker (and I explained the memory issue) than releasing it all at the end of the render.

AFAIK Swift uses ARC, like I imagine Xojo does.