Using malloc/free instead of new/delete