class Reference

Overview

Reference is the base class of classes you define in your program. It is set as a class' superclass when you don't specify one:

class MyClass # < Reference
end

A reference type is passed by reference: when you pass it to methods, return it from methods or assign it to variables, a pointer is actually passed.

Invoking new on a Reference allocates a new instance on the heap. The instance's memory is automatically freed (garbage-collected) when the instance is no longer referred by any other entity in the program.

Direct Known Subclasses

Defined in:

any.cr

Instance Method Summary

Instance methods inherited from class Object

===(other : CON::Any) ===, from_con(con : String | IO) from_con, to_con(io : IO)
to_con
to_con
, to_pretty_con(indent : String = " ")
to_pretty_con(io : IO, indent : String = " ")
to_pretty_con

Instance Method Detail

def ==(other : CON::Any) #

[View source]