public static void Shutdown() { Xpcom.DisposeObject(ref _comGC); if (ComponentRegistrar != null) { Marshal.ReleaseComObject(ComponentRegistrar); } if (ComponentManager != null) { Marshal.ReleaseComObject(ComponentManager); } if (ServiceManager != null) { // NS_ShutdownXPCOM calls Release on the ServiceManager COM objects. // However since the ServiceManager is a __ComObject its finaliser will also call release. var ptr = Marshal.GetIUnknownForObject(ServiceManager); NS_ShutdownXPCOM(ServiceManager); Marshal.ReleaseComObject(ServiceManager); } _IsInitialized = false; }
public void Dispose() { if (_inputStream != null) { Xpcom.DisposeObject(ref _inputStream); } _inputStream = null; GC.SuppressFinalize(this); }
public static void Shutdown() { GeckoPreferences.Shutdown(); WindowWatcher.Shutdown(); WindowMediator.Shutdown(); PromptFactoryFactory.Shutdown(); Xpcom.DisposeObject(ref _comGC); if (Xpcom.ChromeContext != null) { Xpcom.ChromeContext.Dispose(); Xpcom.ChromeContext = null; } if (ComponentRegistrar != null) { Marshal.ReleaseComObject(ComponentRegistrar); } if (ComponentManager != null) { Marshal.ReleaseComObject(ComponentManager); } if (ServiceManager != null) { var s = GetService <nsIObserverService>("@mozilla.org/observer-service;1"); s.NotifyObservers(null, "profile-change-net-teardown", "shutdown-persist"); s.NotifyObservers(null, "profile-change-teardown", "shutdown-persist"); s.NotifyObservers(null, "profile-before-change", "shutdown-persist"); s.NotifyObservers(null, "profile-before-change2", "shutdown-persist"); Marshal.ReleaseComObject(s); // NS_ShutdownXPCOM calls Release on the ServiceManager COM objects. // However since the ServiceManager is a __ComObject its finaliser will also call release. var ptr = Marshal.GetIUnknownForObject(ServiceManager); NS_ShutdownXPCOM(ServiceManager); Marshal.ReleaseComObject(ServiceManager); } _IsInitialized = false; }
public static void Shutdown() { GeckoPreferences.Shutdown(); WindowWatcher.Shutdown(); WindowMediator.Shutdown(); PromptFactoryFactory.Shutdown(); Xpcom.DisposeObject(ref _comGC); if (Xpcom.ChromeContext != null) { Xpcom.ChromeContext.Dispose(); Xpcom.ChromeContext = null; } if (ComponentRegistrar != null) { Marshal.ReleaseComObject(ComponentRegistrar); } if (ComponentManager != null) { Marshal.ReleaseComObject(ComponentManager); } if (ServiceManager != null) { // NS_ShutdownXPCOM calls Release on the ServiceManager COM objects. // However since the ServiceManager is a __ComObject its finaliser will also call release. var ptr = Marshal.GetIUnknownForObject(ServiceManager); NS_ShutdownXPCOM(ServiceManager); Marshal.ReleaseComObject(ServiceManager); } _IsInitialized = false; }
public void Dispose() { Xpcom.DisposeObject(ref _collection); GC.SuppressFinalize(this); }
public void Dispose() { Xpcom.DisposeObject(ref _domNode); GC.SuppressFinalize(this); }
public void Dispose() { Xpcom.DisposeObject(ref _domWindowProxy); GC.SuppressFinalize(this); }
public void Dispose() { Xpcom.DisposeObject(ref _inputStream); }