NSWindowController and GC
NSWindowController and GC
Subject : NSWindowController and GC
From: Bryan Matteson <email@hidden >
Date: Wed, 30 Sep 2009 18:20:16 -0500
Delivered-to: email@hidden
Delivered-to: email@hidden
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:content-type :content-transfer-encoding:subject:date:message-id:to:mime-version :x-mailer; bh=Qt/bDyGDlOH4clsLsXdqmIYYsGinnHLaMAW8Wk9kMeg=; b=J/4fzax0sjs8NakN+DGeaTllfHhuEs0LNlypBfx2CfKZjmrPUT1vSs9FpKY9x91qkR gpLfziPW1pXZoadp3W5iz7k078M7ZEeltu1eXqbywQL+fQu8JaSVtagQSviwdE5BvCBG UAsk9/ZnZSowQ9IephsSA6xT81JhgsRnXGw10=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:content-type:content-transfer-encoding:subject:date:message-id :to:mime-version:x-mailer; b=AKe0C9UPelzNrkflJVHdNPd+uGoC4UxfmJ6KJBny3naexwKeRtNc7zlc/IzASu0lqm YB6vhXWHz24g2/dhfpW6iTw7K20tIcxK2anqUz751dQAweYLQq3ASJvdl7NVCfL5XpMk KyBTJP/YmYKmr5btnKuFH46XDC78XAv7ZDo/c=
I was just reminded of something. I use GC in my app, and unless I
specifically disable collection for a window controller, it's
destroyed as soon as it loses key. I solved it by setting the
controller as the delegate of the window, disabling collection for the
window controller in windowDidLoad, and re-enabling it in
windowWillClose:. Is there another way?
-B
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2011 Apple Inc. All rights reserved.