code for 1.9.19alphas
Christopher R. Hertel
crh at NTS.Umn.EDU
Thu Apr 16 16:16:57 GMT 1998
Ooops. Fingers slipped.
What I meant to say was...
>
> ok, further comments (this is posted to samba-technical, too).
>
> instead of a separate free_xxx function, add an extra BOOL parameter to
> make_xxxx.
>
> if True, malloc. if False, free. call other make_xxxx sub-functions with
> the extra BOOL parameter too.
Eeeuuwww. Yech. Nasty.
> reason: this will keep mallocs and frees in the same place. this is
> important so that future development doesn't get out of step (resulting in
> loss of memory stuff).
Mallocs and frees should be in the same file, but as complimentary
calls. Okay, this is *principle*, and practice sometimes strays, but
it's generally a bad idea to overload a single function. A function
should perform *a function*.
Chris -)-----
--
Christopher R. Hertel -)----- University of Minnesota
crh at nts.umn.edu Networking and Telecommunications Services
More information about the samba-technical
mailing list