set released pointer to nullptr.
parent
d2e449a0af
commit
df4294e6b8
|
@ -56,5 +56,18 @@ int main()
|
||||||
delete office7;
|
delete office7;
|
||||||
delete office8;
|
delete office8;
|
||||||
|
|
||||||
|
head = nullptr;
|
||||||
|
sichuanBranch = nullptr;
|
||||||
|
cdBranch = nullptr;
|
||||||
|
myBranch = nullptr;
|
||||||
|
office1 = nullptr;
|
||||||
|
office2 = nullptr;
|
||||||
|
office3 = nullptr;
|
||||||
|
office4 = nullptr;
|
||||||
|
office5 = nullptr;
|
||||||
|
office6 = nullptr;
|
||||||
|
office7 = nullptr;
|
||||||
|
office8 = nullptr;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
|
@ -35,6 +35,11 @@ int main()
|
||||||
delete device2;
|
delete device2;
|
||||||
delete device3;
|
delete device3;
|
||||||
delete device4;
|
delete device4;
|
||||||
|
factory = nullptr;
|
||||||
|
device1 = nullptr;
|
||||||
|
device2 = nullptr;
|
||||||
|
device3 = nullptr;
|
||||||
|
device4 = nullptr;
|
||||||
|
|
||||||
system("pause");
|
system("pause");
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -37,6 +37,14 @@ int main()
|
||||||
delete bill2;
|
delete bill2;
|
||||||
delete bill3;
|
delete bill3;
|
||||||
delete bill4;
|
delete bill4;
|
||||||
|
zuzhang = nullptr;
|
||||||
|
bingge = nullptr;
|
||||||
|
chunzong = nullptr;
|
||||||
|
laoban = nullptr;
|
||||||
|
bill1 = nullptr;
|
||||||
|
bill2 = nullptr;
|
||||||
|
bill3 = nullptr;
|
||||||
|
bill4 = nullptr;
|
||||||
|
|
||||||
system("pause");
|
system("pause");
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue