C++ delete (Re: [sword-devel] Notes on the search progress bug)
Paul Gear
sword-devel@crosswire.org
Sun, 29 Oct 2000 13:45:23 +1000
"Troy A. Griffitts" wrote:
> ...
> if (scope)
> delete scope;
> ...
Why is there so much code like this in Sword? Doesn't the C++ standard
guarantee that delete will behave appropriately on a null pointer? If
so, this code is redundant and confusing - it makes it look like scope
is a boolean. (All of this is one more good reason to use Java. :-)
Paul
---------
"He must become greater; i must become less." - John 3:30
http://www.bigfoot.com/~paulgear