Ejemplo n.º 1
0
	/// Releases all allocated listeners
	void ReleaseListeners()
	{
		for( listenerList::iterator it = listeners.begin(); it != listeners.end(); ++it ) {
			__delete__( *it );
		}
		listeners.clear();
	}
Ejemplo n.º 2
0
	/// Releases pointers to AS functions held by allocated listeners
	void ReleaseListnersFunctions()
	{
		listenerList::iterator it;
		for( it = listeners.begin(); it != listeners.end(); ++it ) {
			(*it)->releaseFunctionPtr();
		}
	}
Ejemplo n.º 3
0
	void GarbageCollect( void ) {
		for( listenerList::iterator it = listeners.begin(); it != listeners.end(); ) {
			ScriptEventListener *listener = *it;
			if( !listener->isValid() ) {
				it = listeners.erase( it );
				__delete__( listener );
				continue;
			}
			++it;
		}
	}