www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/15/15:17:11

From: Eric Rudd <rudd AT cyberoptics DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Another aspect of free() ?
Date: 10 Jan 1997 15:36:57 GMT
Organization: CyberOptics Corp
Lines: 12
Message-ID: <5b5nmq$i4c@hagar.cyberoptics.com>
References: <199701090726 DOT KAA00800 AT marstu DOT mari DOT su> <32D4B22D DOT 54F9 AT post DOT comstar DOT ru>
NNTP-Posting-Host: rudd.cyberoptics.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

According to the ANSI/ISO C specification, sub-clause 7.10.3.2,

"The _free_ function causes the space pointed to by _ptr_ to be 
deallocated, that is, made available for further allocation.  If 
_ptr_ is a null pointer, no action occurs."

Thus, if the compiler implementation conforms to the C standard, 
it is acceptable to pass it a null pointer.

-Eric Rudd
rudd AT cyberoptics DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019