Skip to content

Commit ec32837

Browse files
committed
Fix isEqualToString memory leak
1 parent d7202b3 commit ec32837

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cocoa-foundation/src/foundation.rs

+1
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,7 @@ impl NSString for id {
649649
unsafe fn isEqualToString(self, other: &str) -> bool {
650650
let other = NSString::alloc(nil).init_str(other);
651651
let rv: BOOL = msg_send![self, isEqualToString: other];
652+
let _: () = msg_send![other, release];
652653
rv != NO
653654
}
654655

0 commit comments

Comments
 (0)