Overload new and delete operator

Top Post on IndiBlogger

new operator allocates the memory then calls the constructor. delete operator calls the destructor then delete the memory. As these are operators, so it can be overloaded. But why we need to overload these operators.* In case, there is lot of allocation and deallocation happens from the heap memory, it can affect the performance. So, to overcome this, we overload the new and delete operator.* Also, as part of above scenario, heap memory gets fragmented. As a result, even though there is suf...

Read this post on allabouttechnologies.co.in

Karan Arora

blogs from Chandigarh