home *** CD-ROM | disk | FTP | other *** search
/ C by Discovery (4th Edition) / C_By_Discovery_4th_Edition.tar / C_By_Discovery_4th_Edition / CH_12 / 684.jpg < prev    next >
Joint Photographic Experts Group Image  |  2013-12-12  |  791KB  |  2550x3300
Labels: book | reckoner
OCR: 684 Chapter Discovering C++ If an array is allocated with new with statement like array new int [20]; then the array brackets must be pasn with delete The syntax of the state- ment 10 properly de-allocate the memory referenced by array delete av Failure to use the brack kets will cause only the cell of the array to be -de allocated Since the address of the remaining cells are not stored in any vari- able the remaining cells can not be accessed. This is a second way to cause memory leak It is the responsibility of the programmer to make sure that memory leaks are avoided 12.3 C++ and OOP Data Abstraction and Encapsulation It is difficult to give an exact definition of Object Oriented Programming (OOP other than it is a method of designing and implementing software. Object Oriented Programmi ...