NSBezierPath retain crash
NSBezierPath retain crash
- Subject: NSBezierPath retain crash
- From: Chad Harrison <email@hidden>
- Date: Wed, 12 Nov 2003 13:02:52 -0500
I have an object which includes one instance of a NSBezierPath, but
when I try to do anything with the path (like transform or stroke), it
crashes - I though that since I am creating it with bezierPathWithRect:
rect, it was autoreleased and I did not have to retain it. Even if I
specifically retain and release it, it crashes. I'm missing something
here.
@interface MyObject : NSObject {
NSBezierPath *path;
NSAffineTransform *transform;
NSRect rect;
int rectPointW, rectPointH;
}
- (void)setSize:(int)dimension
{
rect.size = NSMakeSize( dimension, dimension);
path = [NSBezierPath bezierPathWithRect: rect];
}
- (void)transform
{
transform = [[NSAffineTransform alloc]
initWithTransform:[NSAffineTransform transform]];
[transform translateXBy:rectPointW yBy:rectPointH];
[path transformUsingAffineTransform: transform]; <---- crashes
here
[transform release];
}
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.