Re: a quick malloc question
From: chaoith (aaa_at_aaa.com)
Date: 09/27/03
- Previous message: drejcicaREMOVE_at_volja.net: "a quick malloc question"
- In reply to: drejcicaREMOVE_at_volja.net: "a quick malloc question"
- Next in thread: Darko M.: "Re: a quick malloc question"
- Reply: Darko M.: "Re: a quick malloc question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 27 Sep 2003 06:38:36 +0800
drejcicaREMOVE@volja.net wrote:
> 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)?
It is not the reason to use malloc().
>If it's not a pointer, does it lead to
> a memory leak?
Look into stdlib.h and see the malloc() declaration.
> However, if it is a pointer, I can use one and the same
> address every time I change its value.
Go to buy a book on C.
- Previous message: drejcicaREMOVE_at_volja.net: "a quick malloc question"
- In reply to: drejcicaREMOVE_at_volja.net: "a quick malloc question"
- Next in thread: Darko M.: "Re: a quick malloc question"
- Reply: Darko M.: "Re: a quick malloc question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|