Module: GC
- Defined in:
- gc.c
Class Method Summary collapse
-
.disable ⇒ Boolean
Disables garbage collection, returning
true
if garbage collection was already disabled. -
.enable ⇒ Boolean
Enables garbage collection, returning
true
if garbage collection was previously disabled. -
.start ⇒ Object
Initiates garbage collection, unless manually disabled.
Instance Method Summary collapse
-
#garbage_collect ⇒ Object
Initiates garbage collection, unless manually disabled.
Class Method Details
.disable ⇒ Boolean
Disables garbage collection, returning true
if garbage collection was already disabled.
GC.disable #=> false
GC.disable #=> true
|
# File 'gc.c'
VALUE
rb_gc_disable()
{
int old = dont_gc;
dont_gc = Qtrue;
return old;
}
VALUE rb_mGC;
static struct gc_list {
VALUE *varptr;
struct gc_list *next;
}
|
.enable ⇒ Boolean
Enables garbage collection, returning true
if garbage collection was previously disabled.
GC.disable #=> false
GC.enable #=> true
GC.enable #=> false
|
# File 'gc.c'
VALUE
rb_gc_enable()
{
int old = dont_gc;
dont_gc = Qfalse;
return old;
}
|
.start ⇒ nil .garbage_collect ⇒ nil .garbage_collect ⇒ nil
Initiates garbage collection, unless manually disabled.
|
# File 'gc.c'
VALUE
rb_gc_start()
{
rb_gc();
return Qnil;
}
|
Instance Method Details
#start ⇒ nil #garbage_collect ⇒ nil #garbage_collect ⇒ nil
Initiates garbage collection, unless manually disabled.
|
# File 'gc.c'
VALUE
rb_gc_start()
{
rb_gc();
return Qnil;
}
|