The GC module provides an interface to Ruby’s mark and sweep garbage collection mechanism. Some of the underlying methods are also available via the ObjectSpace module.
| Public Methods | |
|---|---|
| disable | Disables garbage collection, returning true if garbage collection was already disabled. |
| enable | Enables garbage collection, returning true if garbage collection was previously disabled. |
| garbage_ |
Initiates garbage collection, unless manually disabled. |
| start | Initiates garbage collection, unless manually disabled. |
<code/>and<pre/>for code samples.