a quick malloc question

drejcicaREMOVE_at_volja.net
Date: 09/27/03


Date: Fri, 26 Sep 2003 22:09:06 GMT

Hello,
if I use a variable multiple times within my program, is it better to
declare it as a pointer and malloc() it every time (if the value of the
variable is changed many times)? If it's not a pointer, does it lead to
a memory leak? However, if it is a pointer, I can use one and the same
address every time I change its value.

Thanks,

    andrej

-- 
echo ${girl_name} > /etc/dumpdates


Relevant Pages

  • Re: a quick malloc question
    ... > if I use a variable multiple times within my program, ... > declare it as a pointer and mallocit every time (if the value of the ... It is not the reason to use malloc(). ...
    (comp.unix.programmer)
  • Re: a quick malloc question
    ... > if I use a variable multiple times within my program, ... > declare it as a pointer and mallocit every time (if the value of the ... It is not the reason to use malloc(). ...
    (comp.unix.programmer)
  • a quick malloc question
    ... if I use a variable multiple times within my program, ... declare it as a pointer and malloc() it every time (if the value of the ... If it's not a pointer, ...
    (comp.unix.programmer)
  • Re: (part 10) More Schildt-like errors in Dicky Heathens book
    ... like mallocif mallocreturns a non-NULL pointer. ... If one is using a debugging malloc which checks that all accesses are ... when sz is zero, it gives the debugging allocator an opportunity to ...
    (comp.lang.c)
  • Re: How do I stop a TSP written in Delphi crashing on Add Provider?
    ... > You cast mod to a pointer to TCHAR but you declare it a char. ... >> Dim buffer As String ... >> I can successfully use the code above to access a functions in the Delphi ...
    (microsoft.public.win32.programmer.tapi)