define: DUK_USE_MARK_AND_SWEEP introduced: 1.0.0 removed: 2.0.0 default: true tags: - gc - memory description: > Enable mark-and-sweep garbage collection (recommended). When disabled, only reference counting is used for garbage collection. This reduces code footprint and eliminates garbage collection pauses, but objects participating in unreachable reference cycles won't be collected until the Duktape heap is destroyed. In particular, function instances won't be collected because they're always in a reference cycle with their default prototype object. Unreachable objects are collected if you break reference cycles manually (and are always freed when a heap is destroyed). NOTE: Removed in Duktape 2.0.0 because mark-and-sweep is no longer optional.