• 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: Cocoa-dev Digest, Vol 5, Issue 268
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa-dev Digest, Vol 5, Issue 268


  • Subject: Re: Cocoa-dev Digest, Vol 5, Issue 268
  • From: Daniel Child <email@hidden>
  • Date: Tue, 19 Feb 2008 17:18:12 -0500

Thanks Bill & Hamish,

Changing the init method worked. I am still a little puzzled though. I later renamed the ivar to localDataCopy (which certainly wouldn't be a part of the NSWindow class), and the same error occurred. My accessors definitely assume an NSMutableDictionary. Does that mean a memory-munching bug????

In any case, it works fine. now. Thanks.

Daniel

On Feb 19, 2008, at 3:04 PM, email@hidden wrote:

Hamish is correct in that this should be structured something like:

- init
{
	if (self = [super initWithWindowNibName: @"Step1Window"]) {
		data = [[NSMutableDictionary alloc] init];
	}
	return self;
}

Given that you declared the instance variable in the class w/the init,
super better not be replacing your ivar!

So, how could data become a non-mutable object?

(1) Unarchival generally produces immutable objects unless you
explicitly ask for mutable objects.

(2) You released data and replaced it with a reference to an immutable
object

(3) You have a memory munching bug

_______________________________________________

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


  • Follow-Ups:
    • Re: Cocoa-dev Digest, Vol 5, Issue 268
      • From: Bill Bumgarner <email@hidden>
  • Prev by Date: Re: Is there any way to track mouse Entered & mouse Exited without a window in Tiger?
  • Next by Date: Re: Cocoa-dev Digest, Vol 5, Issue 268
  • Previous by thread: Re: Is there any way to track mouse Entered & mouse Exited without a window in Tiger?
  • Next by thread: Re: Cocoa-dev Digest, Vol 5, Issue 268
  • Index(es):
    • Date
    • Thread