Beispiel #1
0
	/// Releases all allocated listeners
	void ReleaseListeners()
	{
		for( listenerList::iterator it = listeners.begin(); it != listeners.end(); ++it ) {
			__delete__( *it );
		}
		listeners.clear();
	}
	/// Releases pointers to AS functions held by allocated listeners
	void ReleaseListnersFunctions()
	{
		listenerList::iterator it;
		for( it = listeners.begin(); it != listeners.end(); ++it ) {
			(*it)->releaseFunctionPtr();
		}
	}
Beispiel #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;
		}
	}