What is the difference between Free and Delete
Delete is used in C++ where as Free is used in C. They are both used for memory management and for releasing a chunk of memory which you have allocated using either Malloc in C or New in C++. The main difference between the two is that by using Delete you don't need to do any typcasting as to what type of data you want to free up. Using Free, you would have to typcast.

0 Comments:
Post a Comment
<< Home