effect of free()

News system news at ism780c.isc.com
Sat Sep 16 07:24:32 AEST 1989


In article <1641 at levels.sait.edu.au> CCDN at levels.sait.edu.au (DAVID NEWALL) writes:
>I have a philosophy which I am going to share with you:  Avoid unnecessary
>restrictions.  Is it truly necessary that one not be able to *look* at a
>pointer without first knowing that it is valid?  I claim that it is not.

I don't understand this discussion.  Inspecting a pointer variable that is
not initialzed is no different from inspecting ANY uninitialized variable.  A
pointer that has free applied to it is unitialized.  How in the world could
any programming language be defined to assign a useful meaning to the
inspection uninitialized data?  Hint: defining the state of local data at
procedure entry can be very expensive.

    Marv Rubinstein



More information about the Comp.lang.c mailing list