Module: Free

Included in:
Object
Defined in:
lib/free.rb,
lib/free/version.rb,
ext/free/free.c

Overview

Author:

  • John Mair (banisterfiend)

Constant Summary collapse

VERSION =
"0.2.7"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.free(*args) ⇒ nil

Free multiple objects at once.

Examples:

h = "hello"
g = "goodbye"
m = "good morning"

Free.free h, g, m

Parameters:

  • args (Array)

    The objects to free.

Returns:

  • (nil)

    Returns nil.



20
# File 'lib/free.rb', line 20

def self.free(*args) end

Instance Method Details

#freenil, Object

Force garbage collection on an object and free its internal structures.

Examples:

h = "hello"
def h.__destruct__
  :killed
end

h.free #=> :killed

Returns:

  • (nil, Object)

    Return value of _destruct_ method (if defined) or nil (if no _destruct_ method)



32
# File 'lib/free.rb', line 32

def free() end