System Events
 
 
 

The following are system events in the Kernel object which can be monitored:

The following example demonstrates how to monitor a low memory event.

 
  class MyClass : public Node
  {
    aevent lowMemoryEventReceiver;
 
    MyClass()
    {
      lowMemoryEventReceiver.Connect( Kernel()->m_eLowMemory );
    };
 
    void OnEvent( const EventGate &cEvent )
    {
      if ( cEvent == m_eLowMemory )
      {
        // free some buffers
      }
    }
  };