← Docs
kotlin-stdlib / kotlin.native.runtime / GC / regularGCInterval

regularGCInterval

Native
1.3
var regularGCInterval : Duration
(source)

When Kotlin code is not allocating enough to trigger GC, the GC scheduler uses timer to drive collection. Timer-triggered collection will happen roughly in regularGCInterval .. 2 * regularGCInterval since any previous collection.

Default: 10 seconds

Unused in legacy MM.

Exceptions

IllegalArgumentException - when value is negative.

Stay in touch:
  • Contributing to Kotlin
  • Releases
  • Press Kit
  • Security
  • Blog
  • Issue Tracker
  • Brand assets
  • Careers
Supported and developed by JetBrains .
Kotlin™ is protected under the Kotlin Foundation
and licensed under the Apache 2 license .