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


7550
7551
# File 'Monkeybrains.rb', line 7550

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


7543
7544
# File 'Monkeybrains.rb', line 7543

def stillAlive()
end