Harrie Hazewinkel wrote:

>
>
> --On Tuesday, July 30, 2002 12:30 PM +0300 Kaido Karner 
> <[EMAIL PROTECTED]> wrote:
>
>>> I think I would prefer to have these combined into a single function.
>>> gw_free now maps onto the gw_native_free or gw_check_free with macros.
>>> We could make the macros as such that they pass the pointer to the
>>> address space containing the pointer and make the pointer even NULL.
>>>
>>> What do others think?? I guess that in more places the pointer needs
>>> to be 'NULL'-ed after the free.
>>
>>
>> I'd say no - this would propagate bad programming practices.
>
>
> As for bad practises, you can see it that way. I however would
> say it maps onto another function which can do more the 'free'
> alone. IMHO, that warrants the change. It also protects developers.
>
>
> What do others think??

I do not agree that it promotes bad practices - letting the 
infrastructure do more of the nitty-gritty stuff, cleaning after the 
programmer and letting it focus on the algorithms instead of on the code 
is a good practice.
I'd say - go for it.

--
Oded Arbel
m-Wise mobile solutions




Reply via email to