NSProxy and ... memory troubles
NSProxy and ... memory troubles
- Subject: NSProxy and ... memory troubles
- From: kubernan <email@hidden>
- Date: Sun, 26 Jan 2003 01:40:05 +0100
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.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.