Program Name: tld null consturctor A(): (0x0) Indeces: (0,0) (0,0) #ref: 1 sa:0 (int, int) constructor C(M,N): (10x10) Indeces: (0,9) (0,9) #ref: 1 sa:0 X(const &X) constructor D(C) :(10x10) Indeces: (0,9) (0,9) #ref: 1 sa:0 D(i,j) = 3.3 test ref and inject G.ref(D) :(10x10) Indeces: (0,9) (0,9) #ref: 2 sa:0 G: 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 G = C G: (10x10) Indeces: (0,9) (0,9) #ref: 2 sa:0 G: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (double *, int , int) constructor F(v,10,10): (10x10) Indeces: (0,9) (0,9) #ref: 2 sa:0 X(const &X) constructor E(C): (10x10) Indeces: (0,9) (0,9) #ref: 1 sa:0 test INDEX_CHK test operator(int, int) Initalize C(i,j) = i + j/100.0 C: (10x10) Indeces: (0,9) (0,9) #ref: 1 sa:0 0 1 1.01 2 2.01 2.02 3 3.01 3.02 3.03 4 4.01 4.02 4.03 4.04 5 5.01 5.02 5.03 5.04 5.05 6 6.01 6.02 6.03 6.04 6.05 6.06 7 7.01 7.02 7.03 7.04 7.05 7.06 7.07 8 8.01 8.02 8.03 8.04 8.05 8.06 8.07 8.08 9 9.01 9.02 9.03 9.04 9.05 9.06 9.07 9.08 9.09 test C.debug(int): C: 0 1 1.01 2 2.01 2.02 3 3.01 3.02 3.03 4 4.01 4.02 4.03 4.04 5 5.01 5.02 5.03 5.04 5.05 6 6.01 6.02 6.03 6.04 6.05 6.06 7 7.01 7.02 7.03 7.04 7.05 7.06 7.07 8 8.01 8.02 8.03 8.04 8.05 8.06 8.07 8.08 9 9.01 9.02 9.03 9.04 9.05 9.06 9.07 9.08 9.09 test outofbounds check double tmp = C(1,3) tmp: 8.09 operator=(double) E = 5.55 : (10x10) Indeces: (0,9) (0,9) #ref: 1 sa:0 E: 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 5.55 D.copy(C): (10x10) Indeces: (0,9) (0,9) #ref: 1 sa:0 D: 0 1 1.01 2 2.01 2.02 3 3.01 3.02 3.03 4 4.01 4.02 4.03 4.04 5 5.01 5.02 5.03 5.04 5.05 6 6.01 6.02 6.03 6.04 6.05 6.06 7 7.01 7.02 7.03 7.04 7.05 7.06 7.07 8 8.01 8.02 8.03 8.04 8.05 8.06 8.07 8.08 9 9.01 9.02 9.03 9.04 9.05 9.06 9.07 9.08 9.09 D.ref(C): (10x10) Indeces: (0,9) (0,9) #ref: 2 sa:0 0 1 1.01 2 2.01 2.02 3 3.01 3.02 3.03 4 4.01 4.02 4.03 4.04 5 5.01 5.02 5.03 5.04 5.05 6 6.01 6.02 6.03 6.04 6.05 6.06 7 7.01 7.02 7.03 7.04 7.05 7.06 7.07 8 8.01 8.02 8.03 8.04 8.05 8.06 8.07 8.08 9 9.01 9.02 9.03 9.04 9.05 9.06 9.07 9.08 9.09 test automatic destructuion of temporaries: B.ref(C)): (10x10) Indeces: (0,9) (0,9) #ref: 3 sa:0 B.ref(C)): (10x10) Indeces: (0,9) (0,9) #ref: 3 sa:0 B.ref(C)): (10x10) Indeces: (0,9) (0,9) #ref: 3 sa:0 B.ref(C)): (10x10) Indeces: (0,9) (0,9) #ref: 3 sa:0 B.ref(C)): (10x10) Indeces: (0,9) (0,9) #ref: 3 sa:0 B.ref(C)): (10x10) Indeces: (0,9) (0,9) #ref: 3 sa:0 B.ref(C)): (10x10) Indeces: (0,9) (0,9) #ref: 3 sa:0 B.ref(C)): (10x10) Indeces: (0,9) (0,9) #ref: 3 sa:0 B.ref(C)): (10x10) Indeces: (0,9) (0,9) #ref: 3 sa:0 B.ref(C)): (10x10) Indeces: (0,9) (0,9) #ref: 3 sa:0 test C.ref(C) case works correctly. C.ref(C) (10x10) Indeces: (0,9) (0,9) #ref: 3 sa:0