vm/moonshine.js
function (val) {
			if (val === undefined || val === null) return;
			if (val instanceof Array) return this.cacheArray(val);
			if (typeof val == 'object' && val.constructor == Object) return this.cacheObject(val);

			if (!(val instanceof shine.Table) || val.__shine.refCount === undefined) return;

			var i, l, 
				meta = val.__shine;

			for (i = 0, l = meta.keys.length; i < l; i++) this.decrRef(meta.keys[i]);
			for (i = 0, l = meta.values.length; i < l; i++) this.decrRef(meta.values[i]);
			for (i = 0, l = meta.numValues.length; i < l; i++) this.decrRef(meta.numValues[i]);

			this.cacheArray(meta.keys);
			this.cacheArray(meta.values);

			delete meta.keys;
			delete meta.values;

			this.cacheObject(meta);
			delete val.__shine;

			for (i in val) if (val.hasOwnProperty(i)) this.decrRef(val[i]);
		}
function (val) {
			if (val === undefined || val === null) return;
			if (val instanceof Array) return this.cacheArray(val);
			if (typeof val == 'object' && val.constructor == Object) return this.cacheObject(val);

			if (!(val instanceof shine.Table) || val.__shine.refCount === undefined) return;

			var i, l, 
				meta = val.__shine;

			for (i = 0, l = meta.keys.length; i < l; i++) this.decrRef(meta.keys[i]);
			for (i = 0, l = meta.values.length; i < l; i++) this.decrRef(meta.values[i]);
			for (i = 0, l = meta.numValues.length; i < l; i++) this.decrRef(meta.numValues[i]);

			this.cacheArray(meta.keys);
			this.cacheArray(meta.values);

			delete meta.keys;
			delete meta.values;

			this.cacheObject(meta);
			delete val.__shine;

			for (i in val) if (val.hasOwnProperty(i)) this.decrRef(val[i]);
		}
function ( val ) { if ( val === undefined || val === null ) return ; if ( val instanceof Array ) return this . cacheArray ( val ) ; if ( typeof val == 'object' && val . constructor == Object ) return this . cacheObject ( val ) ; if ( ! ( val instanceof shine . Table ) || val . __shine . refCount === undefined ) return ; var i , l , meta = val . __shine ; for ( i = 0 , l = meta . keys . length ; i < l ; i ++ ) this . decrRef ( meta . keys [ i ] ) ; for ( i = 0 , l = meta . values . length ; i < l ; i ++ ) this . decrRef ( meta . values [ i ] ) ; for ( i = 0 , l = meta . numValues . length ; i < l ; i ++ ) this . decrRef ( meta . numValues [ i ] ) ; this . cacheArray ( meta . keys ) ; this . cacheArray ( meta . values ) ; delete meta . keys ; delete meta . values ; this . cacheObject ( meta ) ; delete val . __shine ; for ( i in val ) if ( val . hasOwnProperty ( i ) ) this . decrRef ( val [ i ] ) ; }
Collect an object.
@param {Object} Any object.
Collect an object .