Exemple #1
0
func finalizeLibs() {
	if power != nil {
		power.batGroup.Destroy()
		power.batGroup = nil
		dbus.UnInstallObject(power)
		power = nil
	}
	if upower != nil {
		libupower.DestroyUpower(upower)
		upower = nil
	}
	if login1 != nil {
		liblogin1.DestroyManager(login1)
		login1 = nil
	}
	if mediaKey != nil {
		libkeybinding.DestroyMediaKey(mediaKey)
		mediaKey = nil
	}
	if notifier != nil {
		libnotifications.DestroyNotifier(notifier)
		notifier = nil
	}

	player = nil
}
Exemple #2
0
func finalizeDBusIFC() {
	if dbusObj != nil {
		libdbus.DestroyDBusDaemon(dbusObj)
		dbusObj = nil
	}

	if mediaKeyObj != nil {
		libkeybind.DestroyMediaKey(mediaKeyObj)
		mediaKeyObj = nil
	}

	if loginObj != nil {
		liblogin1.DestroyManager(loginObj)
		loginObj = nil
	}
}