Clean Coding in Xojo: More tips from the community

Splitting hairs

Tracing

Main article: Tracing garbage collection

Tracing garbage collection is the most common type of garbage collection, so much so that “garbage collection” often refers to tracing garbage collection, rather than other methods such as reference counting.

Reference counting

Main article: Reference counting

Reference counting garbage collection is where each object has a count of the number of references to it. Garbage is identified by having a reference count of zero. An object’s reference count is incremented when a reference to it is created and decremented when a reference is destroyed. When the count reaches zero, the object’s memory is reclaimed.[15]

Xojo uses a technique called Automatic Reference Counting (ARC) to manage the memory used by objects. ARC is faster and more efficient than other memory management techniques such as garbage collection.

Source: How Xojo manages memory — Xojo documentation

@Tim_Parnell

1 Like