| GL Studio C++ Runtime API

Public Member Functions | List of all members
WeakReferenceable Class Referenceabstract

`#include <weak_reference.h>`

Inheritance diagram for WeakReferenceable:

## Public Member Functions
virtual void | AddWeakReference (WeakReference *weakRef)=0
virtual void | NotifyWeakReferenceDestroyed (WeakReference *weakReference)=0

## Detailed Description

Interface for getting a weak reference to an object. To implement this class, inherit from WeakReferenceableMixin (see DisplayObject as an example)

## Member Function Documentation

## ◆ AddWeakReference()

virtual void AddWeakReference | ( | WeakReference * | weakRef | ) |
| pure virtual

Add a weak reference to this object, that gets notified when this object is destroyed. Does not take ownership of weakRef.

Parameters

  weakRef | the weak reference to add.

Implemented in WeakReferenceableMixin.

## ◆ NotifyWeakReferenceDestroyed()

virtual void NotifyWeakReferenceDestroyed | ( | WeakReference * | weakReference | ) |
| pure virtual

Notify this object that its weak reference is being destroyed.

Parameters

  weakReference | The weak reference to notify.

Implemented in WeakReferenceableMixin.

The documentation for this class was generated from the following file:

- weak_reference.h