Release window on close not releasing controller?

  • I have a v ery small test app, started from Xcode's New Project
    "Cocoa Application".

    In Interface Builder I made sure to mark the existing single window
    "Release on close".

    I added a custom controller for that window.

    I would like the custom controller to get deallocated when that
    window is closed, but I find I have to add a notification observer on
    windowDid/WillClose: and call [ controller autorelease ] in order to
    make that happen.

    I tried adding [ self autorelease ] to the custom controller's
    awakeFromNib mesavge and that caused it to be released when the
    loadNib message clears its autorelease pool, and all heck broke loose.

    Is there a way to make the custom controller (from the nib)
    automatically be released when the window is released, without
    specifically adding code?

    Thanks,
    Rudi
previous month october 2006 next month
MTWTFSS
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Go to today