 {
     include "../core/Version.as";
 
-	//--------------------------------------------------------------------------
-	//
-	//  Constructor
-	//
-	//--------------------------------------------------------------------------
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
 
     /**
      *  Constructor.
-	 *
-	 *  @param generator A function that creates and returns an instance
-	 *  of the required object.
+     *
+     *  @param generator A function that creates and returns an instance
+     *  of the required object.
      *  
      *  @langversion 3.0
      *  @playerversion Flash 9

     */
    private var destructor:Function;

	//--------------------------------------------------------------------------
	//
	//  Methods
	//
	//--------------------------------------------------------------------------

	/**
	 *	Returns a reference to an instance of the desired object.
	 *  If no instance of the required object exists, calls the function
	 *  specified in this class' <code>generator</code> constructor parameter.
	 * 
	 *  @return An instance of the object.
	 *  
	 *  @langversion 3.0
	 *  @playerversion Flash 9
	 *  @playerversion AIR 1.1
	 *  @productversion Flex 3
	 */
	public function getInstance():Object
	{
		if (!instance)
			instance = generator();

		return instance;
	}
	
	/**
     *  Resets the state of our factory to the initial, uninitialized state.
     *  The reference to our cached instance is cleared.
     * 
     *  @langversion 4.0
     *  @playerversion Flash 9
     *  @playerversion AIR 1.1
     *  @productversion Flex 4

    public function DeferredInstanceFromFunction(generator:Function,
        destructor:Function = null )
    {
        super();

        this.generator = generator;
        this.destructor = destructor;
    }

    //--------------------------------------------------------------------------
    //
    //  Variables
    //
    //--------------------------------------------------------------------------

    /**
     *  @private
     *  The generator function.
     */
    private var generator:Function;

    /**
     *  @private
     *  The generated value.
     */
    private var instance:Object = null;

    /**
     *  @private
