• 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
Re: Passing ids to Distributed Objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Passing ids to Distributed Objects


  • Subject: Re: Passing ids to Distributed Objects
  • From: j o a r <email@hidden>
  • Date: Thu, 5 Dec 2002 01:18:02 +0100

I assume that you mean that an invalid pointer is a pointer that doesn't point to anything useful? What does it point to? Something at random? A deallocated object (track it down using zombies)? An object of some unexpected class, and if so - which class?

Keep in mind that DO is also used between processes, and even between hosts, so you can probably not expect to always be able to do pointer comparison between the sent and received objects. Perhaps you can when you only communicate within one process, I'm not sure.

You talk about invalid pointers, but what is the actual problem with your code? Does it crash, and if so where and how?
It can be a bit problematic the first times you use DO to get a feeling for what should be retained and what should be released. Try to release as little as possible until you know for sure that you don't over-release. Track the retain count of your objects with zombies and logs: NSLog(@"retain count: %d", [myObject retainCount]).

For information on DO and zombies, use the excelent mailing list archive here:

<http://cocoa.mamasam.com/>

j o a r

On Wednesday, Dec 4, 2002, at 21:39 Europe/Stockholm, Nicolai wrote:

First of all startCalculationWithData: doesn't receive a valid pointer.
I've checked the pointers and realized that the pointer I want to pass
has changed when received. I corrected the pointer manually while debugging
and it works!
The setProgress: calls don't make any problems.
The same problem with the pointer occures when I want to send NSImage * back.
I also corrected the pointer manually and everything worked.

Any idea what is going wrong?
_______________________________________________
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.

References: 
 >Passing ids to Distributed Objects (From: Nicolai <email@hidden>)

  • Prev by Date: help with copy: method
  • Next by Date: Re: Inteface Builder and Greek support
  • Previous by thread: Passing ids to Distributed Objects
  • Next by thread: Re: Passing ids to Distributed Objects
  • Index(es):
    • Date
    • Thread