From 9b585b6084b80d0a26a72b57a7c772dd4b228078 Mon Sep 17 00:00:00 2001 From: StephenHeaps <5314553+StephenHeaps@users.noreply.github.com> Date: Tue, 6 Feb 2024 18:54:42 -0500 Subject: [PATCH] Fix brave/brave-ios#8738, brave/brave-ios#8708: Fix memory leak in `SettingsViewController` (brave/brave-ios#8739) --- Sources/Brave/Frontend/Settings/SettingsViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Brave/Frontend/Settings/SettingsViewController.swift b/Sources/Brave/Frontend/Settings/SettingsViewController.swift index 5da5abee1330..716990f832a4 100644 --- a/Sources/Brave/Frontend/Settings/SettingsViewController.swift +++ b/Sources/Brave/Frontend/Settings/SettingsViewController.swift @@ -663,7 +663,7 @@ class SettingsViewController: TableViewController { text: Strings.Privacy.browserLock, detailText: Strings.Privacy.browserLockDescription, image: UIImage(braveSystemNamed: "leo.biometric.login"), - accessory: .view(SwitchAccessoryView(initialValue: Preferences.Privacy.lockWithPasscode.value, valueChange: { isOn in + accessory: .view(SwitchAccessoryView(initialValue: Preferences.Privacy.lockWithPasscode.value, valueChange: { [unowned self] isOn in if isOn { Preferences.Privacy.lockWithPasscode.value = isOn } else {