diff options
Diffstat (limited to 'frontends/cocoa/font.m')
-rw-r--r-- | frontends/cocoa/font.m | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/frontends/cocoa/font.m b/frontends/cocoa/font.m index 17212fff9..66ee5d090 100644 --- a/frontends/cocoa/font.m +++ b/frontends/cocoa/font.m @@ -168,7 +168,7 @@ static NSLayoutManager *cocoa_prepare_layout_manager( const char *bytes, size_t { if (NULL == bytes || 0 == length) return nil; - NSString *string = [[[NSString alloc] initWithBytes: bytes length:length encoding:NSUTF8StringEncoding] autorelease]; + NSString *string = [[NSString alloc] initWithBytes: bytes length:length encoding:NSUTF8StringEncoding] ; if (string == nil) return nil; static NSLayoutManager *layout = nil; @@ -189,17 +189,14 @@ static NSLayoutManager *cocoa_prepare_layout_manager( const char *bytes, size_t return layout; } - [oldString release]; oldString = [string copy]; oldStyle = *style; static NSDictionary *attributes = nil; if (styleChanged || attributes == nil) { - [attributes release]; - attributes = [cocoa_font_attributes( style ) retain]; + attributes = cocoa_font_attributes( style ) ; } - [cocoa_text_storage release]; cocoa_text_storage = [[NSTextStorage alloc] initWithString: string attributes: attributes]; [cocoa_text_storage addLayoutManager: layout]; |