# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1301173194 0 # Node ID dc094750d2845f7d8e2e34e83c6ab59fc17e8211 # Parent 6bb8bff365486da790410adf4dae13b055230e55 Fixed leak in dw_draw_text() not releasing the dictionary which was also pulling the NSColor along. diff -r 6bb8bff36548 -r dc094750d284 mac/dw.m --- 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];