[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Exasperating memory corruption
From: |
William S. Shu |
Subject: |
Re: Exasperating memory corruption |
Date: |
Wed, 19 May 1999 16:28:03 +0100 |
>>
>I've seen this problem happen when I forget to include the "return self"
>at the end of methods. Looking through your code, it appears you may
>have the same problem.
Is this a bug (oops! feature) of Objective-C? I would have thought this
would be probematic only with methods that are expect to return. I can go
through my code and insert returns, but I would not want to return self if I
may later (inadvertently) use it unwisely. In fact, some of my use of
returned id helps indicate if a method successfully carried out a given
operation.
On a separate note: the Default type returned is id (when none is
specified). Is it safe to assume that nil is returned when return value is
not explicit? (Not that I dream of using values I did not expect!)
>
>The frustrating thing about this mistake is that gdb is so totally
>uninformative! You don't always get the exact same segfault either.
Yeah! I've got sore eyes and thin patience to prove it!
William.
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.