Mercurial > dwindows
changeset 917:8567c9ac089d
Switched back to using the dealloc() method in dw_pixmap_destroy() to stop a memory leak on the Mac.
We are not really supposed to call dealloc directly usually but, not sure why release is not freeing the memory.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Fri, 22 Apr 2011 04:23:00 +0000 |
parents | 44a0f9a2e8f9 |
children | 6b400a0f5f70 |
files | mac/dw.m |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mac/dw.m Fri Apr 22 03:59:29 2011 +0000 +++ b/mac/dw.m Fri Apr 22 04:23:00 2011 +0000 @@ -430,6 +430,7 @@ { if([bltdest lockFocusIfCanDraw] == NO) { + free(bltinfo); return; } _DWLastDrawable = bltinfo->dest; @@ -5912,6 +5913,7 @@ pixmap->height = size.height; pixmap->image = image; pixmap->handle = handle; + [image retain]; return pixmap; } @@ -5938,6 +5940,7 @@ pixmap->height = size.height; pixmap->image = image; pixmap->handle = handle; + [image retain]; return pixmap; } @@ -5979,6 +5982,7 @@ pixmap->height = size.height; pixmap->image = image; pixmap->handle = handle; + [image retain]; return pixmap; } @@ -5991,7 +5995,7 @@ void API dw_pixmap_destroy(HPIXMAP pixmap) { NSBitmapImageRep *image = (NSBitmapImageRep *)pixmap->image; - [image release]; + [image dealloc]; free(pixmap); }