• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSBezierPath retain crash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: NSBezierPath retain crash
      • From: Shawn Erickson <email@hidden>
    • Re: NSBezierPath retain crash
      • From: Clark Cox <email@hidden>
    • Re: NSBezierPath retain crash
      • From: Christopher Corbell <email@hidden>
  • Prev by Date: Re: cocoa help
  • Next by Date: Re: NSBezierPath retain crash
  • Previous by thread: Fwd: Missing man pages SOLVED
  • Next by thread: Re: NSBezierPath retain crash
  • Index(es):
    • Date
    • Thread