[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: Small patch to aid use of lib dmalloc



On Tue, Dec 7, 2010 at 3:06 PM, timecop <timecop@xxxxxxxxx> wrote:
>> 5. retain the MYFREE() macro as its pointer clearing side effect is required
>> 8. Instead of simply retaining MYFREE(p) (point 5), we could replace
>> each use of it with an explicit:
>>  free(p);
>>  p = NULL;
>
> Is this "MY" prefix actually in the code?

Sure is :)

> Most sane places call the kind of free your'e talking about here call
> this macro SAFE_FREE() or SAFE_RELEASE() or something. it does
> something along the lines of
>
> if (arg) { free(arg); arg = null; }

Actually, in PCB the nearest equivalent to that is called "SaveFree"


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user