Mercurial > dwindows
changeset 827:dc094750d284
Fixed leak in dw_draw_text() not releasing the dictionary which was also pulling the NSColor along.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sat, 26 Mar 2011 20:59:54 +0000 |
parents | 6bb8bff36548 |
children | 14c9f4a8839e |
files | mac/dw.m |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mac/dw.m Sat Mar 26 20:51:40 2011 +0000 +++ b/mac/dw.m Sat Mar 26 20:59:54 2011 +0000 @@ -4145,6 +4145,7 @@ } [nstr drawAtPoint:NSMakePoint(x, y) withAttributes:dict]; [image unlockFocus]; + [dict release]; } _DWLastDrawable = handle; } @@ -4166,6 +4167,7 @@ } [nstr drawAtPoint:NSMakePoint(x, y) withAttributes:dict]; [image unlockFocus]; + [dict release]; } DW_MUTEX_UNLOCK; } @@ -4180,12 +4182,10 @@ */ void API dw_font_text_extents_get(HWND handle, HPIXMAP pixmap, char *text, int *width, int *height) { - id image = handle; id object = handle; NSString *nstr = [NSString stringWithUTF8String:text]; if(pixmap) { - image = (id)pixmap->image; object = pixmap->handle; } NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];