Re: Problems with setImage

2011-03-06 Thread Benedikt Iltisberger
Hey Quincey, thanks for the reply. You helped me to solve the problem. I was not releasing the arguments of the method (cgImage). I guess because the other variables depend on this one I need to release it first in order to release the rest. After I added this everything works great! Thanks aga

Re: Problems with setImage

2011-03-06 Thread Quincey Morris
On Mar 6, 2011, at 00:19, Benedikt Iltisberger wrote: > NSBitmapImageRep *bitmapRep = [[NSBitmapImageRep alloc] > initWithCGImage:cgImage]; > NSImage *image = [[NSImage alloc] init]; > [image addRepresentation:bitmapRep]; > [bitmapRep release]; > > LEAK -> [myButton

Problems with setImage

2011-03-06 Thread Benedikt Iltisberger
Hello everybody, I have a problem with the setImage method because its leaking memory. I think I understood memory management but I still can't see the problem. Here is all related code: Headerfile Interface: NSButton * myButton; Headfile: @property (nonatomic, retain) IBOutlet N