[SOLVED] Re: NSProxy and ... memory troubles
[SOLVED] Re: NSProxy and ... memory troubles
- Subject: [SOLVED] Re: NSProxy and ... memory troubles
- From: kubernan <email@hidden>
- Date: Sun, 26 Jan 2003 11:27:50 +0100
Hello,
It works better with NSAutoreleasePool *pool = [[NSAutoreleasePool
alloc] init ];
inside -(void)informTheClient...
K.
Le dimanche, 26 jan 2003, ` 01:40 Europe/Paris, kubernan a icrit :
>
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.
_______________________________________________
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.