I see in C++ there are multiple ways to allocate and free data and I understand that when you call malloc you should call free and when you use the
malloc
free
From a lower perspective, new will initialize all the memory before giving the memory whereas malloc will keep the original content of the memory.