Path: utzoo!attcan!uunet!samsung!munnari.oz.au!bruce!goanna!ok From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) Newsgroups: comp.lang.c Subject: Re: free (NULL) Message-ID: <3103@goanna.cs.rmit.oz.au> Date: 30 May 90 07:03:23 GMT References: <1771@mindlink.UUCP> <2574@skye.ed.ac.uk> <1739@necisa.ho.necisa.oz> Organization: Comp Sci, RMIT, Melbourne, Australia Lines: 18 In article <1739@necisa.ho.necisa.oz>, boyd@necisa.ho.necisa.oz (Boyd Roberts) writes: > In article <3078@goanna.cs.rmit.oz.au> ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) writes: [when is it safe to deallocate something] > Well, once you've coded yourself into a corner all bets are off. Choose > a better algorithm, one that has all the pointers in a free-able state. Whether something is freeable is NOT a property of the algorithm which has to make the immediate decision. It is a property of the program that USES the algorithm. If you're writing a library function, you simply haven't any control over the code that uses your function. > I can't see there's much of a problem with the standard libraries. The question had nothing to do with the standard libraries. -- "A 7th class of programs, correct in every way, is believed to exist by a few computer scientists. However, no example could be found to include here."