Package org.jruby
Class RubyGC
java.lang.Object
org.jruby.RubyGC
GC (Garbage Collection) Module
Note: Since we rely on Java's memory model we can't provide the
kind of control over garbage collection that MRI provides. Also note
that since all Ruby libraries make GC assumptions based on MRI's GC
that we decided to no-op explicit collection through these APIs.
You can use Java Integration in your libraries to force a Java
GC (assuming you really want to).
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IRubyObjectcount(ThreadContext context, IRubyObject recv) static RubyModulecreateGCModule(Ruby runtime) static IRubyObjectdisable(ThreadContext context, IRubyObject recv) private static voidemptyImplementationWarning(Ruby runtime, IRubyWarnings.ID id, String name) static IRubyObjectenable(ThreadContext context, IRubyObject recv) static IRubyObjectgarbage_collect(ThreadContext context, IRubyObject recv, IRubyObject[] args) static intstatic longstatic IRubyObjectstart(ThreadContext context, IRubyObject recv, IRubyObject[] args) static IRubyObjectstress(ThreadContext context, IRubyObject recv) static IRubyObjectstress_set(ThreadContext context, IRubyObject recv, IRubyObject arg)
-
Field Details
-
gcDisabled
private static volatile boolean gcDisabled -
stress
private static volatile boolean stress
-
-
Constructor Details
-
RubyGC
public RubyGC()
-
-
Method Details
-
createGCModule
-
start
-
garbage_collect
public static IRubyObject garbage_collect(ThreadContext context, IRubyObject recv, IRubyObject[] args) -
enable
-
disable
-
stress
-
stress_set
-
count
-
emptyImplementationWarning
-
getCollectionCount
public static int getCollectionCount() -
getCollectionTime
public static long getCollectionTime()
-