Fix isEqualToString memory leak (#730)
This commit is contained in:
@@ -649,6 +649,7 @@ impl NSString for id {
|
|||||||
unsafe fn isEqualToString(self, other: &str) -> bool {
|
unsafe fn isEqualToString(self, other: &str) -> bool {
|
||||||
let other = NSString::alloc(nil).init_str(other);
|
let other = NSString::alloc(nil).init_str(other);
|
||||||
let rv: BOOL = msg_send![self, isEqualToString: other];
|
let rv: BOOL = msg_send![self, isEqualToString: other];
|
||||||
|
let _: () = msg_send![other, release];
|
||||||
rv != NO
|
rv != NO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user