Hi,
As part of our process we have a nightly reset to clear caches and reset everything to "fresh". I have tried incorporating a call to Cleanup (included below) followed by init and run but am running into a whole host of issues that randomly pop up, usually during init, common exception is 'System.AccessViolationException'.
My goal here is just to stop the stream of data and clear out subscriptions for the start of a new day. Is this the right approach?
if (ommConsumer != null) { if (loginHandle != 0) { ommConsumer.UnregisterClient(loginHandle); loginHandle = 0; } if (ommConnIntSpecHandle != 0) { ommConsumer.UnregisterClient(ommConnIntSpecHandle); ommConnIntSpecHandle = 0; } ommConsumer.Destroy(); ommConsumer = null; } if (session != null) { session.Release(); session = null; } if (eventQueue != null) { eventQueue.Deactivate(); eventQueue.Destroy(); eventQueue = null; } if ((!Context.Uninitialize()) && (Context.InitializedCount == 0)) { }