diff --git a/ChangeLog b/ChangeLog index 6272cc199..b7dff2714 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-05-22 Richard Frith-Macdonald + + Fix longstanding NSSerialiser deserialisation problem ... is not + retaining cross-referenced items... which is not a problem unless + the item happens to be a dictionary key which is copied/released + when the corresponding value is added to the dictionary. + 2006-05-20 Richard Frith-Macdonald Restore reversions with a bugfix for deserialising ascii strings diff --git a/Source/NSSerializer.m b/Source/NSSerializer.m index fadfe34e8..0a334d9af 100644 --- a/Source/NSSerializer.m +++ b/Source/NSSerializer.m @@ -670,7 +670,13 @@ deserializeFromInfo(_NSDeserializerInfo* info) else { (*mdSetImp)(d, mdSetSel, o, k); - RELEASE(k); + /* + * Since a dictionary copies its keys rather + * than retaining them, we must autorelease + * rather than simply releasing as the key may + * be referred to by a cross-reference later. + */ + AUTORELEASE(k); RELEASE(o); } }