Fix isEqualToString memory leak (#730)

This commit is contained in:
alphaArgon
2025-04-23 15:52:10 +08:00
committed by GitHub
parent d7202b3451
commit 0e783c6355
+1
View File
@@ -649,6 +649,7 @@ impl NSString for id {
unsafe fn isEqualToString(self, other: &str) -> bool {
let other = NSString::alloc(nil).init_str(other);
let rv: BOOL = msg_send![self, isEqualToString: other];
let _: () = msg_send![other, release];
rv != NO
}