When can you tell that a memory leak will occur?



When can you tell that a memory leak will occur?..

Answer / harendra pal

A memory leak occurs when a program loses the ability to free a block of dynamically allocated memory.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

Is it possible to use a new for the reallocation of pointers ?

0 Answers  


What is slicing?

1 Answers  


Why is c++ is better than c?

0 Answers  


What is the maximum value of a unsigned char a) 255 b) 256 c) 128

0 Answers  


difference between macro and function?

3 Answers  






What is a c++ vector?

0 Answers  


Is empty stack c++?

0 Answers  


how to connect with oracle 9i with server in socket program in c/c++

0 Answers   3i Infotech,


class Alpha { public: char data[10000]; Alpha(); ~Alpha(); }; class Beta { public: Beta() { n = 0; } void FillData(Alpha a); private: int n; }; How do you make the above sample code more efficient? a) If possible, make the constructor for Beta private to reduce the overhead of public constructors. b) Change the return type in FillData to int to negate the implicit return conversion from "int" to "void". c) Make the destructor for Alpha virtual. d) Make the constructor for Alpha virtual. e) Pass a const reference to Alpha in FillData

2 Answers   Quark,


Describe linkages and types of linkages?

0 Answers  


What is polymorphism and its type in c++?

0 Answers  


What is a storage class used in c++?

0 Answers  


Categories