* nsfns.m (Fns_convert_utf8_nfd_to_nfc): Allocate and release pool to
remove memory leak warnings.
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.
/* 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;
}