Re: Why does this leak memory?
Re: Why does this leak memory?
- Subject: Re: Why does this leak memory?
- From: Matt Ball <email@hidden>
- Date: Mon, 11 Jul 2005 00:51:09 -0400
Array Image: NSImage 0x327550 Name=icon Size={128, 128} Reps=(
NSBitmapImageRep 0x3b69c0 Size={128, 128}
ColorSpace=NSCalibratedRGBColorSpace BPS=8 BPP=32 Pixels=128x128
Alpha=YES Planar=NO Format=3,
NSBitmapImageRep 0x3b6ca0 Size={48, 48}
ColorSpace=NSCalibratedRGBColorSpace BPS=8 BPP=32 Pixels=48x48
Alpha=YES Planar=NO Format=3,
NSBitmapImageRep 0x3b6ee0 Size={32, 32}
ColorSpace=NSCalibratedRGBColorSpace BPS=8 BPP=32 Pixels=32x32
Alpha=YES Planar=NO Format=3,
NSBitmapImageRep 0x3b6c20 Size={16, 16}
ColorSpace=NSCalibratedRGBColorSpace BPS=8 BPP=32 Pixels=16x16
Alpha=YES Planar=NO Format=3,
NSBitmapImageRep 0x3b7130 Size={48, 48}
ColorSpace=NSCalibratedWhiteColorSpace BPS=1 BPP=2 Pixels=48x48
Alpha=YES Planar=NO Format=2,
NSBitmapImageRep 0x3b7610 Size={32, 32}
ColorSpace=NSCalibratedWhiteColorSpace BPS=1 BPP=2 Pixels=32x32
Alpha=YES Planar=NO Format=2,
NSBitmapImageRep 0x3b79e0 Size={16, 16}
ColorSpace=NSCalibratedWhiteColorSpace BPS=1 BPP=2 Pixels=16x16
Alpha=YES Planar=NO Format=2
)
Current Image: NSImage 0x3a63b0 Size={38, 38} Reps=(
NSCachedImageRep 0x3b63d0 Size={38, 38}
ColorSpace=NSCalibratedRGBColorSpace BPS=8 Pixels=38x38 Alpha=YES
)
New image: NSImage 0x31d890 Size={38, 38} Reps=(
NSCachedImageRep 0x3a27b0 Size={38, 38}
ColorSpace=NSCalibratedRGBColorSpace BPS=8 Pixels=38x38 Alpha=YES
And it gets called plenty. I've got some mouse tracking set up in my
tableview to deal with some button rollovers, and it redraws the cell
every time the mouse moves. So every time I add a layer or move the
mouse over the view, the log that I posted gets logged. (So by the
time it crashes, I've got hundreds of that sequence of logs).
- Matt Ball
On 7/11/05, Charilaos Skiadas <email@hidden> wrote:
>
>
> On Jul 10, 2005, at 11:40 PM, Matt Ball wrote:
>
> Current Image: NSImage 0x3ae2d0 Size={38, 38} Reps=(
> NSCachedImageRep 0x3a5210 Size={38, 38}
> ColorSpace=NSCalibratedRGBColorSpace BPS=8 Pixels=38x38
> Alpha=YES
> )
>
> New image: NSImage 0x3b3c10 Size={38, 38} Reps=(
> NSCachedImageRep 0x3b6570 Size={38, 38}
> ColorSpace=NSCalibratedRGBColorSpace BPS=8 Pixels=38x38
> Alpha=YES
> )
>
> *crash*
>
> Ah, so setImage is only called once, when the view is first populated and
> before you click on a row? So the crash must occur before [cell
> setImage:image]; comes around the second time. How about an NSLog(@"Array
> Image: %@", image); between these two lines:
>
> NSImage *image = [array
> objectAtIndex:indexToQueryForImage];
> image = [self shadowedImageWithImage:image];
>
>
> - Matt Ball
>
> Haris
>
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden