N
nrk
Grumble said:Overhead? Could you, please, elaborate?
Joona's code will call free() every time. Alexandre's code will call
free() every time - epsilon.
Joona's code will not check the pointer against NULL everytime. Alexandre's
code will. Given that it is rather rare to run into situations where
malloc returns NULL, makes eminent sense to avoid the unnecessary check and
optimize the most common case.
-nrk.