All IT and Non IT Interview Questions, MCQs, Online Quiz Questions, Engineering VIVA Questions
Home » Unlabelled » On throwing an exception by the Animal constructor in p = new AnimalQ, can memory leak occur? | C++
Tuesday, 17 April 2012
On throwing an exception by the Animal constructor in p = new AnimalQ, can memory leak occur? | C++
Memory of an animal class cannot leak by throwing an exception in p = new Animal(). In case of occurrence of an exception during the Animal constructor of p = new Animal(),there is a surety of the automatic releasing of the allocated memory back to the heap.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment