home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 6 / mastvb6.iso / numega / sc501.exe / data1.cab / Examples / CPPERR.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1997-11-25  |  1007 b   |  49 lines

  1. /*
  2.  * CPPErr.cpp
  3.  * $Header: /BoundsChecker/Examples/BUGBNCHX/MAINERR/CPPERR.CPP 3     12/11/96 4:03p Stevea $
  4.  *
  5.  * Description:
  6.  *  The C++ Check error functions.
  7.  *
  8.  * Notes:
  9.  *  <implementation notes go here>
  10.  *
  11.  ***********************************************************************
  12.  *
  13.  * Nu-Mega Technologies, Inc.
  14.  * P.O. Box 7780
  15.  * Nashua, NH 03060
  16.  *
  17.  * (c) Copyright 1994, 1995 Nu-Mega Technologies, Inc.
  18.  * ALL RIGHTS RESERVED.
  19.  *
  20.  ***********************************************************************
  21.  *
  22.  **********************************************************************/
  23. #include "stdafx.h"
  24. #include "CPPErr.h"
  25.  
  26. // C++ Check - Memory allocation conflict.
  27. void CPP_MemConflictMallocDelete ( )
  28. {
  29.    _TRY
  30.    {
  31.       char * pchB = (char*)malloc ( sizeof ( char ) ) ;
  32.       delete pchB ;
  33.    }
  34.    _CATCH
  35.    {
  36.    }
  37. }
  38. void CPP_MemConflictNewFree ( )
  39. {
  40.    _TRY
  41.    {
  42.       char * pchA = new char ;
  43.       free ( pchA ) ;
  44.    }
  45.    _CATCH
  46.    {
  47.    }
  48. }
  49.