I'm getting a runtime assertion failure like this:
"<FFRender3DView 0x616000271580> has reached dealloc but still has a super view. Super views strongly reference their children, so this is being over-released, or has been over-released in the past."
Looking at the code, I can't see any strong reference to the view except by its superview, so I can't see how it could be released other than by removal from its superview. My first instinct was to override release
and set a breakpoint there, but that's not possible in ARC code.
I've gotten rid of the assertion failure, but I can't say I understand how. I had code that retrieves a view pointer via a void*
output parameter of a library function, like so:
NSView* theView = nil;
Q3Object_GetProperty( inDC, 'PWin', sizeof(void*), nullptr, &theView );
When I changed it to the following code, the error went away:
NSView* theView = nil;
void* rawViewPtr = nullptr;
Q3Object_GetProperty( inDC, 'PWin', sizeof(void*), nullptr, &rawViewPtr );
theView = (__bridge NSView*) rawViewPtr;