mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
attempt memory leak fix
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29993 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a6a60f81f7
commit
3c17e185e9
2 changed files with 18 additions and 1 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2010-03-17 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSConnection.m: Fix for memory leak ... autorelease
|
||||
objects returned by method in remote process because the invocation
|
||||
won't do it for us (we call -setReturnValue: which will have the invocation
|
||||
retain the object, so when it releases it again later the retain count is
|
||||
the same as at the point when we decoded the object, and another release
|
||||
is needed).
|
||||
I'm not certain this fix is right, but it seems ok.
|
||||
|
||||
2010-03-13 Yavor Doganov <yavor@gnu.org> (tiny change)
|
||||
|
||||
* Source/NSCalendarDate.m (outputValueWithFormat)
|
||||
|
|
|
@ -2105,11 +2105,18 @@ static NSLock *cached_proxies_gate = nil;
|
|||
/* xxx What happens with method declared "- (in char *) bar;" */
|
||||
/* xxx Is this right? Do we also have to check _F_ONEWAY? */
|
||||
{
|
||||
id obj;
|
||||
|
||||
/* If there is a return value, decode it, and put it in datum. */
|
||||
if (*tmptype != _C_VOID || (flags & _F_ONEWAY) == 0)
|
||||
{
|
||||
switch (*tmptype)
|
||||
{
|
||||
case _C_ID:
|
||||
datum = &obj;
|
||||
[aRmc decodeValueOfObjCType: tmptype at: datum];
|
||||
[obj autorelease];
|
||||
break;
|
||||
case _C_PTR:
|
||||
/* We are returning a pointer to something. */
|
||||
tmptype++;
|
||||
|
@ -2151,7 +2158,7 @@ static NSLock *cached_proxies_gate = nil;
|
|||
if (*tmptype == _C_PTR
|
||||
&& ((flags & _F_OUT) || !(flags & _F_IN)))
|
||||
{
|
||||
/* If the arg was myref, we obtain its address
|
||||
/* If the arg was byref, we obtain its address
|
||||
* and decode the data directly to it.
|
||||
*/
|
||||
tmptype++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue