• 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
Re: NSBezierPath retain crash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSBezierPath retain crash


  • Subject: Re: NSBezierPath retain crash
  • From: Clark Cox <email@hidden>
  • Date: Wed, 12 Nov 2003 14:30:13 -0500

On Nov 12, 2003, at 13:02, Chad Harrison wrote:

> 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];

You need to retain path here.

> }
>
>
> - (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.
>


--
Clark S. Cox III
email@hidden
http://homepage.mac.com/clarkcox3/blog/B1196589870/index.html

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.

References: 
 >NSBezierPath retain crash (From: Chad Harrison <email@hidden>)

  • Prev by Date: Re: PopUp button + Controller Layer
  • Next by Date: Re: Updating the main menu
  • Previous by thread: Re: NSBezierPath retain crash
  • Next by thread: Re: NSBezierPath retain crash
  • Index(es):
    • Date
    • Thread