示例#1
0
	/// Releases all allocated listeners
	void ReleaseListeners()
	{
		for( listenerList::iterator it = listeners.begin(); it != listeners.end(); ++it ) {
			__delete__( *it );
		}
		listeners.clear();
	}
示例#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();
		}
	}
示例#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;
		}
	}
示例#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;
	}