FROM : kubernan
DATE : Sun Jan 26 00:52:01 2003
Hello,
My client/server app. uses Distributed Object.
The server uses a proxy for sending aynchonous message
to the client in this way (in the server) :
-(void)informTheClient
{
NSMutableDictionary *notificationDict = [[NSMutableDictionary alloc]
init];
NSNumber *aNumber = [[NSNumber alloc] initWithInt:1];
[notificationDict setObject:aNumber forKey:@"test"];
[aNumber release];
[clientProxy aClientProtocolMethod:notificationDict];
[notificationDict release];
}
Executing this code, the server can send informations to the client but
the memory increases and is not freed...
The problem seems come from [clientProxy
aClientProtocolMethod:notificationDict].
I tried to understand why and to follow it under ObjectAlloc without
success.
I also tried [clientProxy aClientProtocolMethod:[[notificationDict
copy] autorelease]]
but the memory leak still exists.
for information, the interface is :
id clientProxy;
And the initialization is (in the server) :
-(void)initClientProxy:(id)sender
{
clientProxy = sender; // sender is what i received from client DO
calls
[clientProxy retain];
[(NSDistantObject *) clientProxy setProtocolForProxy:
@protocol(aClientProtocol)];
}
Can you help me ?
Thx a lot.
Kub.
DATE : Sun Jan 26 00:52:01 2003
Hello,
My client/server app. uses Distributed Object.
The server uses a proxy for sending aynchonous message
to the client in this way (in the server) :
-(void)informTheClient
{
NSMutableDictionary *notificationDict = [[NSMutableDictionary alloc]
init];
NSNumber *aNumber = [[NSNumber alloc] initWithInt:1];
[notificationDict setObject:aNumber forKey:@"test"];
[aNumber release];
[clientProxy aClientProtocolMethod:notificationDict];
[notificationDict release];
}
Executing this code, the server can send informations to the client but
the memory increases and is not freed...
The problem seems come from [clientProxy
aClientProtocolMethod:notificationDict].
I tried to understand why and to follow it under ObjectAlloc without
success.
I also tried [clientProxy aClientProtocolMethod:[[notificationDict
copy] autorelease]]
but the memory leak still exists.
for information, the interface is :
id clientProxy;
And the initialization is (in the server) :
-(void)initClientProxy:(id)sender
{
clientProxy = sender; // sender is what i received from client DO
calls
[clientProxy retain];
[(NSDistantObject *) clientProxy setProtocolForProxy:
@protocol(aClientProtocol)];
}
Can you help me ?
Thx a lot.
Kub.
| Related mails | Author | Date |
|---|---|---|
| kubernan | Jan 26, 00:52 | |
| kubernan | Jan 26, 02:27 |






Cocoa mail archive

