ADT
        aaron-thesis
        arm-eh
        ast-experimental
        cleanup-dtors
        deferred_resn
        demangler
        enum
        forall-pointer-decay
        jacob/cs343-translation
        jenkins-sandbox
        new-ast
        new-ast-unique-expr
        new-env
        no_list
        persistent-indexer
        pthread-emulation
        qualifiedEnum
        resolv-new
        with_gc
      
      
        
          | Last change
 on this file since 21b7161 was             12d3187, checked in by Rob Schluntz <rschlunt@…>, 9 years ago | 
        
          | 
final revisions to thesis
 | 
        
          | 
              
Property                 mode
 set to                 100644 | 
        
          | File size:
            252 bytes | 
      
      
| Rev | Line |  | 
|---|
| [12d3187] | 1 | #include <cstdlib> | 
|---|
|  | 2 | #include <iostream> | 
|---|
|  | 3 | using namespace std; | 
|---|
|  | 4 |  | 
|---|
|  | 5 | class A { | 
|---|
|  | 6 | public: | 
|---|
|  | 7 | A() { | 
|---|
|  | 8 | cout << "A()" << endl; | 
|---|
|  | 9 | } | 
|---|
|  | 10 | ~A(){ | 
|---|
|  | 11 | cout << "~A()" << endl; | 
|---|
|  | 12 | } | 
|---|
|  | 13 | }; | 
|---|
|  | 14 |  | 
|---|
|  | 15 | int 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.