FREE

Phil Cornes pc at cs.keele.ac.uk
Fri Mar 2 00:18:35 AEST 1990


>From article <2714 at stl.stc.co.uk>, by dsr at stl.stc.co.uk (David Riches):
> In most cases only the pointer to the space is known but will the
> following free up all the space :-
>   #define NE_ARR_FREE(x)     { free((char *) sizeof(x)); x = 0; }
> 

No this just won't work - you can only pass a pointer returned by malloc()
into a call to free()....



Phil Cornes          I just called to say .....
-----------*
                     JANET: cdtpc at uk.ac.stafpol.cr83
                     Phone: +44 (0)785 53511 x6058
                     Smail: Staffordshire Polytechnic, Computing Department,
                            Blackheath Lane, STAFFORD, ST18 0AD, ENGLAND.



More information about the Comp.lang.c mailing list