bugGNUstep - Bugs: bug #25370, NSUserDefaults doesn't copy...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #25370: NSUserDefaults doesn't copy mutable objects

Submitted by:  Doug Simons <theeggcamefirst>
Submitted on:  Wed 21 Jan 2009 05:55:33 AM UTC  
 
Category: Base/FoundationSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Wed 21 Jan 2009 06:40:44 AM UTC, comment #1:

Thanks for the report ... I added a fix to the code in svn.

Richard Frith-Macdonald <CaS>
Project Member
Wed 21 Jan 2009 05:55:33 AM UTC, original submission:

The NSUserDefaults method setObject:forKey: apparently just retains the object rather than copying it. This leads to some unexpected behavior if the object is mutated after calling setObject:forKey: but before calling synchronize -- namely, the wrong value is stored in the defaults database. This is different from Cocoa's behavior.

Doug Simons <theeggcamefirst>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by CaS (Posted a comment)
  • -unavailable- added by theeggcamefirst (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 21 Jan 2009 06:40:44 AM UTCCaSStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1