class method
GC.count
() -> ::Integer
self.count → integer
gc.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/gc.rb, line 124
def self.count
Primitive.gc_count
end
Returns the total number of times garbage collection has occurred:
Example
GC.count # => 385 GC.start GC.count # => 386