comparison mac/dw.m @ 919:2ab67f71b50f

I guess the retains aren't needed on the NSBitmapImageReps on the Mac. This should fix the memory leak I think.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Fri, 22 Apr 2011 04:56:59 +0000
parents 6b400a0f5f70
children f47d5fa72f84
comparison
equal deleted inserted replaced
918:6b400a0f5f70 919:2ab67f71b50f
5879 hasAlpha:YES 5879 hasAlpha:YES
5880 isPlanar:NO 5880 isPlanar:NO
5881 colorSpaceName:NSDeviceRGBColorSpace 5881 colorSpaceName:NSDeviceRGBColorSpace
5882 bytesPerRow:0 5882 bytesPerRow:0
5883 bitsPerPixel:0]; 5883 bitsPerPixel:0];
5884 [image retain];
5885 return pixmap; 5884 return pixmap;
5886 } 5885 }
5887 5886
5888 /* 5887 /*
5889 * Creates a pixmap from a file. 5888 * Creates a pixmap from a file.
5911 NSSize size = [image size]; 5910 NSSize size = [image size];
5912 pixmap->width = size.width; 5911 pixmap->width = size.width;
5913 pixmap->height = size.height; 5912 pixmap->height = size.height;
5914 pixmap->image = image; 5913 pixmap->image = image;
5915 pixmap->handle = handle; 5914 pixmap->handle = handle;
5916 [image retain];
5917 return pixmap; 5915 return pixmap;
5918 } 5916 }
5919 5917
5920 /* 5918 /*
5921 * Creates a pixmap from memory. 5919 * Creates a pixmap from memory.
5938 NSSize size = [image size]; 5936 NSSize size = [image size];
5939 pixmap->width = size.width; 5937 pixmap->width = size.width;
5940 pixmap->height = size.height; 5938 pixmap->height = size.height;
5941 pixmap->image = image; 5939 pixmap->image = image;
5942 pixmap->handle = handle; 5940 pixmap->handle = handle;
5943 [image retain];
5944 return pixmap; 5941 return pixmap;
5945 } 5942 }
5946 5943
5947 /* 5944 /*
5948 * Sets the transparent color for a pixmap 5945 * Sets the transparent color for a pixmap
5980 NSSize size = [image size]; 5977 NSSize size = [image size];
5981 pixmap->width = size.width; 5978 pixmap->width = size.width;
5982 pixmap->height = size.height; 5979 pixmap->height = size.height;
5983 pixmap->image = image; 5980 pixmap->image = image;
5984 pixmap->handle = handle; 5981 pixmap->handle = handle;
5985 [image retain];
5986 return pixmap; 5982 return pixmap;
5987 } 5983 }
5988 5984
5989 /* 5985 /*
5990 * Destroys an allocated pixmap. 5986 * Destroys an allocated pixmap.