mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
minor osx compatibility tweak
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31999 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
30f3b2c03f
commit
abbde1c543
2 changed files with 22 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2011-02-04 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSConcretePointerFunctions.m: objects with weak memory should
|
||||||
|
not be retained.
|
||||||
|
|
||||||
2011-02-03 Philippe Roussel <p.o.roussel@free.fr>
|
2011-02-03 Philippe Roussel <p.o.roussel@free.fr>
|
||||||
|
|
||||||
* Source/NSPropertyList.m: Fix memory leaks.
|
* Source/NSPropertyList.m: Fix memory leaks.
|
||||||
|
|
|
@ -225,7 +225,14 @@ relinquishRetainedMemory(const void *item,
|
||||||
}
|
}
|
||||||
else if (options & NSPointerFunctionsObjectPointerPersonality)
|
else if (options & NSPointerFunctionsObjectPointerPersonality)
|
||||||
{
|
{
|
||||||
_x.acquireFunction = acquireRetainedObject;
|
if (options & NSPointerFunctionsZeroingWeakMemory)
|
||||||
|
{
|
||||||
|
_x.acquireFunction = acquireExistingMemory;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_x.acquireFunction = acquireRetainedObject;
|
||||||
|
}
|
||||||
_x.descriptionFunction = describeObject;
|
_x.descriptionFunction = describeObject;
|
||||||
_x.hashFunction = hashShifted;
|
_x.hashFunction = hashShifted;
|
||||||
_x.isEqualFunction = equalDirect;
|
_x.isEqualFunction = equalDirect;
|
||||||
|
@ -253,12 +260,20 @@ relinquishRetainedMemory(const void *item,
|
||||||
}
|
}
|
||||||
else /* objects */
|
else /* objects */
|
||||||
{
|
{
|
||||||
_x.acquireFunction = acquireRetainedObject;
|
if (options & NSPointerFunctionsZeroingWeakMemory)
|
||||||
|
{
|
||||||
|
_x.acquireFunction = acquireExistingMemory;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_x.acquireFunction = acquireRetainedObject;
|
||||||
|
}
|
||||||
_x.descriptionFunction = describeObject;
|
_x.descriptionFunction = describeObject;
|
||||||
_x.hashFunction = hashObject;
|
_x.hashFunction = hashObject;
|
||||||
_x.isEqualFunction = equalObject;
|
_x.isEqualFunction = equalObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue