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
9 months agoRachael
10 months agoAn
10 months agoDottie
10 months agoStevie
10 months agoKiley
10 months agoBenedict
10 months agoKarrie
11 months agoKiera
11 months agoNguyet
11 months agoLennie
11 months agoKattie
11 months agoTruman
11 months agoEmily
11 months agoAmina
11 months agoTemeka
11 months agoKeneth
11 months ago