Commit 423d3b3f authored by Jan Djärv's avatar Jan Djärv

Fix memory leak warning.

* nsfns.m (Fns_convert_utf8_nfd_to_nfc): Allocate and release pool to
remove memory leak warnings.
parent d2d699ac
2013-08-11 Jan Djärv <jan.h.d@swipnet.se>
* nsfns.m (Fns_convert_utf8_nfd_to_nfc): Allocate and release pool to
remove memory leak warnings.
* nsterm.m (menu_pending_title, ns_get_pending_menu_title): Remove.
(ns_check_menu_open): Handle menu == nil. Remove assignment to
menu_pending_title.
......
......@@ -2035,13 +2035,17 @@ and GNUstep implementations ("distributor-specific release
/* TODO: If GNUstep ever implements precomposedStringWithCanonicalMapping,
remove this. */
NSString *utfStr;
Lisp_Object ret;
CHECK_STRING (str);
utfStr = [NSString stringWithUTF8String: SSDATA (str)];
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
utfStr = [NSString stringWithUTF8String: SSDATA (str)];
#ifdef NS_IMPL_COCOA
utfStr = [utfStr precomposedStringWithCanonicalMapping];
utfStr = [utfStr precomposedStringWithCanonicalMapping];
#endif
return build_string ([utfStr UTF8String]);
ret = build_string ([utfStr UTF8String]);
[pool release];
return ret;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment