gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in NSRunLoop?


From: Marcus Müller
Subject: Re: Bug in NSRunLoop?
Date: Mon, 10 Jun 2002 20:34:57 +0200

On Monday, June 10, 2002, at 06:46 PM, Richard Frith-Macdonald wrote:

I think the bug is in your test code.
You forgot to retain the handle for the new incoming connection ... so the handle is
being deallocated, and the connection shut down.

Congratulations, that's the bug! ;-) I didn't notice it, because ...

It may be working one MacOS-X because the sequence of autorelease pools being used is
different, or it may be that MacOS-X has a memory leak.

... the retainCount of that socket is 2 on Mac OS X (as opposed to 1 on GNUstep). It's strange, however, that the retainCount bug doesn't kick in for the first connection, though. AFAIK I always implemented socket server code since OPENSTEP this way. But it's pretty simple to "fix" my code to retain and release in the appropriate places, so it will work on GNUstep and on OS X.

Thanks for figuring that out!

Cheers,

  Marcus

--
Marcus Mueller  .  .  .  crack-admin/coder ;-)
Mulle kybernetiK  .  http://www.mulle-kybernetik.com
Current projects: finger address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]