Passing NSMutableArrays across NSConnection to Another Program
Passing NSMutableArrays across NSConnection to Another Program
- Subject: Passing NSMutableArrays across NSConnection to Another Program
- From: Lloyd Sargent <email@hidden>
- Date: Tue, 21 Aug 2001 19:26:25 -0500
Okay, I passed an NSMutableArray from program B to program A via the
following
---Program A (I have a local pool because this is in a thread) ---
NSMutableArray *blah;
for (;;)
{
localPool = [[NSAutoreleasePool alloc] init];
blah = [proxy returnData];
NSLog(@"And the count is: %d", [blah count]);
[localPool release]; // allegedly the data should be "released"???
}
---Program B---
- (NSMutableArray *) returnData
{
return [array autorelease];
}
I'm having acid reflux over the autorelease and the fact that I am
puking in program A leads me to believe that I shouldn't do that. What
is the "normal" method of handling this sort of thing?
Otherwise it returns the correct count and all. I'm just in a quandary
about how disposal, etc. is supposed to work!
Cheers,
Lloyd
--------
Canna Software Development
"No llamas were served gin and tonics in the creation of this e-mail."