Subject: Re: bug#43973: 28.0.50; [NS] Two crashes on macOS

From: Alan Third <[email-masked]>
Date: Sat, 24 Oct 2020 17:59:54 +0100

On Fri, Oct 23, 2020 at 09:37:43PM -0400, Win Treese wrote:
> I got curious about what was going on with this bug after looking at
> other alloc/dealloc problems on the Mac, and I’m wondering if there
> is an initialization problem in setTranform:
> 
> The code is:
> 
> - (void)setTransform: (double[3][3]) m
> {
>   transform = [[NSAffineTransform transform] retain];
>   NSAffineTransformStruct tm
>     = { m[0][0], m[0][1], m[1][0], m[1][1], m[2][0], m[2][1]};
>   [transform setTransformStruct:tm];
> }
>
> It seems to create a new NSAffineTransform object with the existing
> value of transform.

No, [NSAffineTransform transform] is a call to the class method
"transform", it's not actually a reference to the variable transform,
although I can see why that is confusing.

https://developer.apple.com/documentation/foundation/nsaffinetransform?language=objc

-- 
Alan Third