www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/16/16:50:55

From: aho450s AT nic DOT smsu DOT edu (Tony O'Bryan)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: delete NULL?
Date: Sun, 16 Feb 1997 20:04:22 GMT
Organization: Southwest Missouri State University
Lines: 12
Message-ID: <330767f3.6557055@ursa.smsu.edu>
References: <19970216 DOT 124451 DOT 7287 DOT 0 DOT fwec AT juno DOT com>
NNTP-Posting-Host: forseti.i116.smsu.edu
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Sun, 16 Feb 1997 17:38:42 GMT, fwec AT juno DOT com (Mark T Logan) wrote:

>
>I just finished writing a C++ implementation of a circular linked list.
>
>My question is this.  If I use delete on a pointer which is equal to
>NULL,
>for example...

I've written some small stuff using new and delete with Turbo C++.  Deleting a
NULL pointer caused my program to crash, so I advise checking for NULL before
deleting anything.

- Raw text -


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