Skip to content

Commit 0e783c6

Browse files
authored
Fix isEqualToString memory leak (#730)
1 parent d7202b3 commit 0e783c6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cocoa-foundation/src/foundation.rs

Lines changed: 1 addition & 0 deletions
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)