TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Auke Reitsma
from: George White
date: 1998-08-30 18:10:14
subject: Mdebug

Hi Auke,

You wrote to Darin McBride,

AR> AR>> - I suspect it behaves badly in the presence of strdup().

AR> DM> 1. strdup() is non-standard.

AR>Yeah. But so what. It is so useful that if it didn't exist
AR>you'd have to invent it ... if it weren't in Snippets.

Seconded!

AR> DM> 2. This is one reason I hate functions that return dynamically
AR> DM> allocated memory without providing an opposite method to clean it
AR> DM> up.

AR>Nah. The opposite method for strdup() is free().

AR> DM>   Even a simple unstrdup() would be helpful to remind everyone
AR> DM> to clean up...  malloc/calloc have free, fopen has fclose, ...

AR>1:  #define unstrdup(x) free(x)

AR>2:  ... windows has deltree c:\windows. ;-)

:-)

AR>3:  ... new has delete, but newt does not have deletet ...

newt has heron :-)
(Well the ones in my brothers garden pond do...).

George

 * SLMR 2.1a * Computers eliminate spare time.

--- Maximus/2 3.01
* Origin: DoNoR/2,Woking UK (44-1483-717904) (2:440/4)
SEEN-BY: 396/1 622/419 632/0 371 633/260 267 270 371 634/397 635/506 728 810
SEEN-BY: 639/252 670/213 218
@PATH: 440/4 255/1 251/25 2320/38 270/101 396/1 633/260 635/506 728 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.