• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Garbage collection leak in simple Core Data application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Garbage collection leak in simple Core Data application


  • Subject: Re: Garbage collection leak in simple Core Data application
  • From: Bill Bumgarner <email@hidden>
  • Date: Fri, 28 Nov 2008 12:12:50 -0800

On Nov 28, 2008, at 3:10 PM, Mathieu Coursolle wrote:
Thanks for your reply,

Even if I create other windows and delete them after, the lost controllers seem to be lost forever.
I tried to select menu items and it actually speeds up the collection of some, but some are still lost forever.
I waited for a while, continued to create/close windows, and it did not finalize. A lot of them will finalize,
but if one is not, even if I continue to use the application for a while, gc-roots will always show me some roots,
as it shows no roots for the finalized ones.


As a test, I added the following code in the finalize method of the document with the same results.

for (NSWindowController* aController in [self windowControllers])
{
	[self removeWindowController:aController];
	NSWindow* aWindow = [aController window];
	[aController setWindow:nil];
	[aWindow setWindowController:nil];
}

I printed the roots again, it seems like I was able to get a bit more info. However, it seems like there are 2 roots this time.

Odd. One issue -- Your -finalize will never run if the collector doesn't think the object is garbage.


Please file a bug via http://bugreport.apple.com/, attach your sample project, and send me the bug #.

b.bum
_______________________________________________

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


References: 
 >Garbage collection leak in simple Core Data application (From: Mathieu Coursolle <email@hidden>)
 >Re: Garbage collection leak in simple Core Data application (From: Rob Keniger <email@hidden>)
 >Re: Garbage collection leak in simple Core Data application (From: Bill Bumgarner <email@hidden>)
 >Re: Garbage collection leak in simple Core Data application (From: Mathieu Coursolle <email@hidden>)
 >Re: Garbage collection leak in simple Core Data application (From: Bill Bumgarner <email@hidden>)
 >Re: Garbage collection leak in simple Core Data application (From: Mathieu Coursolle <email@hidden>)

  • Prev by Date: Re: Garbage collection leak in simple Core Data application
  • Next by Date: Re: Core Data modeling question
  • Previous by thread: Re: Garbage collection leak in simple Core Data application
  • Next by thread: Quick Look with native types?
  • Index(es):
    • Date
    • Thread