LinuxGuy <ra**********@gmail.com> wrote:
even if I don't use memset() and just declare the array then will it be
deallocated when function exits..
Your failure to post properly has already been duly noted.
In answer to your actual question, yes, your array will be deallocated
when the function exits, no matter what you do to it. If your
implementation uses a stack (it probably does), it may help to know
that space allocated on the stack is *always* freed when the function
returns. Such is the beauty of "automatic" (whatever C++ calls it)
storage.
--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.