Re: another emi2 bugfix

Oded Arbel <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.