mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
fix retain/release bug deserialising
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22968 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f291dd6f6c
commit
d531b5e572
2 changed files with 14 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2006-05-22 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
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 <rfm@gnu.org>
|
2006-05-20 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
Restore reversions with a bugfix for deserialising ascii strings
|
Restore reversions with a bugfix for deserialising ascii strings
|
||||||
|
|
|
@ -670,7 +670,13 @@ deserializeFromInfo(_NSDeserializerInfo* info)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
(*mdSetImp)(d, mdSetSel, o, k);
|
(*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);
|
RELEASE(o);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue