source: doc/theses/rob_schluntz/examples/malloc.cc @ f4a6101

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change on this file since f4a6101 was 728df66, checked in by Peter A. Buhr <pabuhr@…>, 7 years ago

more documentation name changes

  • Property mode set to 100644
File size: 252 bytes
RevLine 
[12d3187]1#include <cstdlib>
2#include <iostream>
3using namespace std;
4
5class A {
6public:
7  A() {
8    cout << "A()" << endl; 
9  }
10  ~A(){
11    cout << "~A()" << endl;
12  }
13};
14
15int main() {
16  A * x = (A*)malloc(sizeof(A));
17  A * y = new A;
18  delete y;
19  free(x);
20}
Note: See TracBrowser for help on using the repository browser.