Monday, February 23, 2009

Use templates to prevent memory leakage

Make a class template to create an instance of a desired class and in the destructor of the class template, delete the item the pointer points to.
In this way, the programmer won't have to worry about freeing the memory.
Author :Kunal

0 nhận xét:

Post a Comment