diff --git a/Scripts/NodeDataCache.cs b/Scripts/NodeDataCache.cs index e1b465c..da3a86e 100644 --- a/Scripts/NodeDataCache.cs +++ b/Scripts/NodeDataCache.cs @@ -9,6 +9,7 @@ namespace XNode { private static PortDataCache portDataCache; private static Dictionary> formerlySerializedAsCache; private static Dictionary typeQualifiedNameCache; + private static List dynamicListPorts; private static bool Initialized { get { return portDataCache != null; } } public static string GetTypeQualifiedName(System.Type type) { @@ -32,7 +33,6 @@ namespace XNode { Dictionary formerlySerializedAs = null; if (formerlySerializedAsCache != null) formerlySerializedAsCache.TryGetValue(nodeType, out formerlySerializedAs); - List dynamicListPorts = new List(); Dictionary staticPorts; if (!portDataCache.TryGetValue(nodeType, out staticPorts)) { @@ -103,6 +103,8 @@ namespace XNode { listPort.connectionType = backingPort.connectionType; listPort.typeConstraint = backingPort.typeConstraint; } + + dynamicListPorts.Clear(); } /// @@ -144,6 +146,7 @@ namespace XNode { /// Cache node types private static void BuildCache() { portDataCache = new PortDataCache(); + dynamicListPorts = new List(); System.Type baseType = typeof(Node); List nodeTypes = new List(); System.Reflection.Assembly[] assemblies = System.AppDomain.CurrentDomain.GetAssemblies();