6. 综合题

6. 综合题#

出不动了, 一道题, 再见.

 1int main() {
 2  static Noisy c1{Info{.ctor = "r", .dtor = "t"}};
 3  Noisy c2{Info{.ctor = "a", .dtor = "o"}};
 4  {
 5    Noisy* c3 = new Noisy{Info{.ctor = "n", .dtor = "t"}};
 6    Noisy* c4 = nullptr;
 7    static Noisy c5{Info{.ctor = "g", .dtor = "l"}};
 8  }
 9  {
10    Noisy* c6 = nullptr;
11    {
12      Noisy{Info{.ctor = "e", .dtor = "s"}};
13    }
14    {
15      Noisy* c8 = nullptr;
16    }
17    c6         = new Noisy{Info{.ctor = ":", .dtor = "i"}};
18    Noisy* c9  = nullptr;
19    Noisy* c10 = new Noisy{Info{.ctor = ":", .dtor = "o"}};
20    delete c6;
21    {
22      c9 = new Noisy{Info{.ctor = "n", .dtor = "l"}};
23      static Noisy c11{Info{.ctor = "_", .dtor = "u"}};
24      {
25        Noisy* c12 = new Noisy{Info{.ctor = "f", .dtor = "h"}};
26        delete c10;
27        delete new Noisy{Info{.ctor = "u", .dtor = "n"}};
28      }
29      Noisy c14{Info{.ctor = "d", .dtor = "_"}};
30      static Noisy c15{Info{.ctor = "_", .dtor = "s"}};
31      Noisy* c16 = new Noisy{Info{.ctor = "r", .dtor = ":"}};
32      static Noisy c17{Info{.ctor = "e", .dtor = "e"}};
33      static Noisy c18{Info{.ctor = "s", .dtor = "r"}};
34      static Noisy c19{Info{.ctor = "u", .dtor = "_"}};
35      delete c9;
36      static Noisy c20{Info{.ctor = "t", .dtor = "d"}};
37      Noisy* c21 = new Noisy{Info{.ctor = ":", .dtor = "u"}};
38      delete c16;
39      delete new Noisy{Info{.ctor = "o", .dtor = "p"}};
40      Noisy{Info{.ctor = "e", .dtor = "r"}};
41      static Noisy c24{Info{.ctor = "a", .dtor = "n"}};
42      Noisy* c25 = nullptr;
43      c25        = new Noisy{Info{.ctor = "t", .dtor = "s"}};
44      Noisy* c26 = nullptr;
45      Noisy c27{Info{.ctor = "o", .dtor = "r"}};
46    }
47    {
48      Noisy* c28 = new Noisy{Info{.ctor = "i", .dtor = "a"}};
49      delete new Noisy{Info{.ctor = "n", .dtor = "_"}};
50    }
51    static Noisy c30{Info{.ctor = "f", .dtor = "u"}};
52  }
53}