mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
MACOSX: Fix memory leak in copy to clipboard
This commit is contained in:
committed by
Eugene Sandulenko
parent
d48453693c
commit
caa8a5d7bb
@@ -75,7 +75,10 @@ bool setTextInClipboardMacOSX(const Common::U32String &text) {
|
||||
#else
|
||||
NSStringEncoding stringEncoding = NSUTF32BigEndianStringEncoding;
|
||||
#endif
|
||||
return [pb setString:[[NSString alloc] initWithBytes:text.c_str() length:4*text.size() encoding: stringEncoding] forType:NSStringPboardType];
|
||||
NSString *nsstring = [[NSString alloc] initWithBytes:text.c_str() length:4*text.size() encoding: stringEncoding];
|
||||
bool status = [pb setString:nsstring forType:NSStringPboardType];
|
||||
[nsstring release];
|
||||
return status;
|
||||
}
|
||||
|
||||
Common::String getDesktopPathMacOSX() {
|
||||
|
||||
Reference in New Issue
Block a user