bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

reference not released after servicing proxy request


From: Rajendra Kumar Singh
Subject: reference not released after servicing proxy request
Date: Thu, 22 Dec 2011 15:46:10 -0800

Hi,
    I am developing a DO application and I see that after invoking a method from client process, retain count of root object increments by 1. If I keep repeating this, retain counter keeps incrementing.

Even when connection between client and server is released properly (server process receiving proxy_release message), references are not decremented to what it was before proxy was created.

From my debugging, I see root object reference is incremented 2 times in processing the method request but release happens only 1 time. Following are the 2 places:


First place:
#1  0x00007ffff766b311 in +[GSDistantObjectPlaceHolder initWithCoder:] (self=0x7ffff7b125c0, _cmd=<optimized out>, aCoder=<optimized out>) at NSDistantObject.m:224
#2  0x00007ffff76d75ec in -[NSPortCoder decodeValueOfObjCType:at:] (self=0x77e208, _cmd=0x7ffff7b04630, type=<optimized out>, address=0x7fffffffd0a8) at NSPortCoder.m:611
#3  0x00007ffff763e26c in -[NSConnection(Private) _service:forwardForProxy:] (self=0x72fd38, _cmd=0x7ffff7b04880, aRmc=0x77e208) at NSConnection.m:2555
#4  0x00007ffff763d298 in -[NSConnection(Private) handlePortMessage:] (self=0x65d178, _cmd=0x7ffff7b93270, msg=0x72fff8) at NSConnection.m:2335

2nd place:
#1  0x00007ffff77657ef in -[GSFFIInvocation invokeWithTarget:] (self=0x77a848, _cmd=<optimized out>, anObject=0x71da58) at GSFFIInvocation.m:449
#2  0x00007ffff768cae4 in -[NSInvocation invoke] (self=0x77a848, _cmd=0x7ffff7b04930) at NSInvocation.m:627
#3  0x00007ffff763e983 in -[NSConnection(Private) _service:forwardForProxy:] (self=0x72fd38, _cmd=0x7ffff7b04880, aRmc=0x77e208) at NSConnection.m:2695
#4  0x00007ffff763d298 in -[NSConnection(Private) handlePortMessage:] (self=0x65d178, _cmd=0x7ffff7b93270, msg=0x72fff8) at NSConnection.m:2335


second retain is released when invokation is deallocated. But nobody seems to be releasing the first retain.

I think
[NSConnection(Private) _service:forwardForProxy:] should release the reference after invoking the method because it gets 1 reference as part of following call:

    /* Decode the object, (which is always the first argument to a method). */
      [decoder decodeValueOfObjCType: @encode(id) at: &object];

Is this a bug ? I am using gnustep-base-1.23.0.

Thanks
Rajendra

reply via email to

[Prev in Thread] Current Thread [Next in Thread]