Tracking down Window controller not deallocated when window closes

I have a window controller that stores a lot of objects, and when its window is closed it is not being deallocated. This was actually working ok before the project was converted to ARC, and now is not.

The window controller is allocated and stored in a local variable:

SettingsAdjustments *settingsCtrl=[SettingsAdjustments alloc];

Later its window is opened:

[settingsCtrl showWindow:nil]; [[settingsCtrl window] makeKeyAndOrderFront:nil];

In the pre-ARC code it was released at the end of the function. Now I assume the local reference should be released when it goes out of scope. So far as I know there are no other permanent references to it.

I tried instrumenting the application with Allocations, and the only thing that shows in the allocation history for the object is the allocation. There is no sign of it being released when the variable goes out of scope, or a reference being retained when the window is opened.

Maybe I'm not using the Allocations tool correctly. I understood it was meant to show this. Anyone have any ideas as to what might be holding onto the reference, or how to dig further?

Tracking down Window controller not deallocated when window closes
 
 
Q