private void unregister() { lock (lck) { numberOfInstances--; if (numberOfInstances <= 0x00) { Unloader.DeleteBuffer(ref dataBuff); } } }
void IIoCRegistration.Unload(object instance) { if (Unloader != null) { var typedInstance = (T)instance; Unloader.Invoke(typedInstance); } (instance as IDisposable)?.Dispose(); }
private void unregister() { lock (lck) { numberOfInstances--; if (numberOfInstances <= 0x00) { Unloader.DeleteBuffer(ref xntBuff); Unloader.DeleteTexture(texBuff); } } }
public IDisposable UnloadIndex(string indexName) { var unloader = new Unloader(indexName, _unloadedIndices); try { RemoveResources(indexName); if (_mappings.ContainsKey(indexName)) { _mappings.TryRemove(indexName, out MappingResource mapping); } return(unloader); } catch (Exception ex) { unloader.Dispose(); throw new Exception($"Error on unloading index { indexName }", ex); } }
public string Start(string assembly, string clazz, IHost host, IWorld world, UUID id, string name, Unloader unloader, string[] args) { m_scheduler = new MicroScheduler(); _unloader = unloader; AppDomain.CurrentDomain.UnhandledException += (sender, exceptionArgs) => Kill(exceptionArgs.ExceptionObject as Exception); try { m_id = id; m_name = name; m_mrm = (MRMBase)Activator.CreateInstanceFrom(assembly, clazz).Unwrap(); m_world = new SandboxedWorld(world); m_host = new SandboxedHost(host, m_world.Objects, m_scheduler); m_mrm.InitMiniModule(m_world, m_host, id); m_mrm.Start(args); } catch (Exception e) { return FullError(e); } return null; }
void Start() { unloader = GetComponent("Unloader") as Unloader; (new Thread(startStuff)).Start(); }
public void Post([FromBody] Unloader unloader) { }