help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

delete causes crash with a character array


From: Alex Vinokur
Subject: delete causes crash with a character array
Date: Sun, 13 Feb 2005 14:01:35 +0200

GNU g++ 3.3.3, Cygwin


// Stuff

static char* mbuffer = NULL;

// Stuff

void doit()
{
  // Stuff
  mbuffer = new (nothrow) char [1001];
  assert (mbuffer != NULL);

  // Stuff

  assert (mbuffer != NULL);
  delete[] mbuffer;   // Sometimes crashed here (not always).
  mbuffer = NULL;

  // Stuff

}

How can one detect what causes the crash?

Are there any GNU utils that enable to help to solve the problem?


-- 
 Alex Vinokur
     email: alex DOT vinokur AT gmail DOT com
     http://mathforum.org/library/view/10978.html
     http://sourceforge.net/users/alexvn






reply via email to

[Prev in Thread] Current Thread [Next in Thread]