public static void Free(SurfExtractReqB45 req)
 {
     req.verts       = null;
     req.uvs         = null;
     req.materialMap = null;
     req.subMeshIndices.Clear();
     s_reqPool.Free(req);
 }
Пример #2
0
        public void Dispose()
        {
            if (disposed)
            {
                throw new ObjectDisposedException(ToString());
            }

            GenericPool <Flow> .Free(this);
        }
Пример #3
0
    public static void Free(SurfExtractReqMC req)
    {
        int n = req._outDatas.Count;

        if (n > 0)
        {
            // If mesh data not been filled
            for (int i = 0; i < n; i++)
            {
                MCOutputData.Free(req._outDatas [i]);
            }
            req._outDatas.Clear();
        }
        s_reqPool.Free(req);
    }
Пример #4
0
 public static void Free(MCOutputData data)
 {
     if (data._pos.Length == SurfExtractorsMan.c_vertsCnt4Pool)
     {
         s_dataPool.Free(data);
         data._indice = null;
     }
     else
     {
         data._pos    = null;
         data._norm01 = null;
         data._norm2t = null;
         data._indice = null;
     }
 }
Пример #5
0
        public void RestoreTo(IUnit unit)
        {
            if (disposed)
            {
                throw new ObjectDisposedException(ToString());
            }

            // Restore inline values if possible

            foreach (var previousDefaultValue in defaultValues)
            {
                if (unit.defaultValues.ContainsKey(previousDefaultValue.Key) &&
                    unit.valueInputs.Contains(previousDefaultValue.Key) &&
                    unit.valueInputs[previousDefaultValue.Key].type.IsAssignableFrom(previousDefaultValue.Value))
                {
                    unit.defaultValues[previousDefaultValue.Key] = previousDefaultValue.Value;
                }
            }

            // Restore connections if possible

            foreach (var previousInputConnections in inputConnections)
            {
                var previousInputPort   = new UnitPortPreservation(unit, previousInputConnections.Key);
                var previousOutputPorts = previousInputConnections.Value;

                foreach (var previousOutputPort in previousOutputPorts)
                {
                    RestoreConnection(previousOutputPort, previousInputPort);
                }
            }

            foreach (var previousOutputConnections in outputConnections)
            {
                var previousOutputPort = new UnitPortPreservation(unit, previousOutputConnections.Key);
                var previousInputPorts = previousOutputConnections.Value;

                foreach (var previousInputPort in previousInputPorts)
                {
                    RestoreConnection(previousOutputPort, previousInputPort);
                }
            }

            GenericPool <UnitPreservation> .Free(this);
        }
Пример #6
0
 public void Free()
 {
     lock (poolLock) {
         pool.Free(this);
     }
 }