C
CplusplusNewbie
I just looked at some code which unfortunately I no longer have access
to.
To the best of my memory it was something like this:
void SomeFunc(Base*,int);
int main()
{
base Base;
otherbase Base;
SomeFunc(&base,1);
SomeFunc(&otherbase,2);
// Ignore memory leaks
}
The comment //Ignore memory leaks confused me since I didn't think
memory leaks were possible when memory allocation is non-dynamic and
is not via new.
Are there memory leak issues in this type of code?
Thank you very much.
to.
To the best of my memory it was something like this:
void SomeFunc(Base*,int);
int main()
{
base Base;
otherbase Base;
SomeFunc(&base,1);
SomeFunc(&otherbase,2);
// Ignore memory leaks
}
The comment //Ignore memory leaks confused me since I didn't think
memory leaks were possible when memory allocation is non-dynamic and
is not via new.
Are there memory leak issues in this type of code?
Thank you very much.