To be clear, CGImageForProposedRect doesn’t have ‘Create’ in the name. So the
'Create Rule' doesn’t apply. But it is an easy thing to overlook.
—Rob
> On Aug 24, 2023, at 2:35 AM, JPH wrote:
>
> Thanks to all of you
> The CFRelease(imageRef); was the problem and the
ARC only affects Objective-C objects. It has no effect on CF objects like
CGImageRefs, CFArrayRefs, CFDictionaryRefs etc. If you play with CF objects in
an ARC app you still need to release them. You don’t need to release Obj-C
objects and the compiler will warn you if you try to.
—Rob
>
Thanks to all of you
The CFRelease(imageRef); was the problem and the CFRelease(subImageRef); is OK
My fault was then to apply the old days « Create rule » , bypassing ARC !
I was misled by Instruments/Leaks which reports a leak, which meant to me that
I had to look for a missing release,