method

count_objects

v1_9_2_180 - Show latest stable - Class: ObjectSpace
count_objects(p1 = v1)
public

Counts objects for each type.

It returns a hash as: {:TOTAL=>10000, :FREE=>3011, :T_OBJECT=>6, :T_CLASS=>404, …}

If the optional argument, result_hash, is given, it is overwritten and returned. This is intended to avoid probe effect.

The contents of the returned hash is implementation defined. It may be changed in future.

This method is not expected to work except C Ruby.