/// <summary> /// Resets the IronPython engine scope, clears any imported modules and .NET types. /// </summary> public void Reset() { ScriptScope = _scriptEngine.CreateScope(); _typeLoader.Reset(); _autocompleter.Reset(); InstanceMembers.Clear(); StaticMembers.Clear(); Instances.Clear(); Statics.Clear(); InstancesAndStaticsDirty = true; RunScript("import clr"); RunScript("from System import Array"); }
public void Dispose() { Texture?.Dispose(); Texture = null; CreateTexturePacker(); foreach (var obj in Moveables.Values) { obj.Dispose(); } Moveables.Clear(); foreach (var obj in Statics.Values) { obj.Dispose(); } Statics.Clear(); }