• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Passing NSMutableArrays across NSConnection to Another Program
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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."


  • Prev by Date: Re: How can I convert bitmap representations to a "canonical" form
  • Next by Date: Learn Programming by Electro-Shock stimulation!
  • Previous by thread: NIAccess
  • Next by thread: Learn Programming by Electro-Shock stimulation!
  • Index(es):
    • Date
    • Thread