C++ Institute CPA-21-02 Exam - Topic 1 Question 1 Discussion
Which line of code inserted instead of the comment will make the following code run properly without causing memory leaks?
D) ~Base() { delete ptr; }
A) ~Base() ( delete this; }
B) no additional code is needed
C) ~Base() { delete ptr; delete ptr; }
Moon
8 months agoRachael
8 months agoAn
8 months agoDottie
8 months agoStevie
9 months agoKiley
9 months agoBenedict
9 months agoKarrie
9 months agoKiera
9 months agoNguyet
9 months agoLennie
9 months agoKattie
9 months agoTruman
10 months agoEmily
10 months agoAmina
10 months agoTemeka
10 months agoKeneth
10 months ago