Exemple #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();
		}
	}
Exemple #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;
		}
	}
Exemple #4
0
	virtual Rocket::Core::EventListener* InstanceEventListener( const String& value, Element *elem ) {
		if( !value.Length() ) {
			return 0;
		}

		ScriptEventListener *listener = __new__( ScriptEventListener )( value, idCounter++, elem );
		listeners.push_back( listener );
		return listener;
	}