Class: Toybox::Lang::WeakReference

Inherits:
Object
  • Object
show all

Overview

A weak reference is a loosely bound reference to another object. If all strong references have been freed, the WeakReference.get() method will return null. This allows the developer to avoid circular references.

Instance Method Summary collapse

Methods inherited from Object

equals, hashCode, method, toString, weak

Instance Method Details

getToybox::Lang::Object

Get the Object referenced by the WeakReference

Returns:

Since:

  • 1.2.0


6476
6477
# File 'Monkeybrains.rb', line 6476

def get()
end

stillAliveToybox::Lang::Boolean

Note:

I feel FANTASTIC and I am still alive. When you're dying I'll be still alive. And when you're dead I will be still alive.

Determine whether a WeakReference is still alive.

Returns:

See Also:

Since:

  • 1.2.0


6469
6470
# File 'Monkeybrains.rb', line 6469

def stillAlive()
end