temp pointer to a vector or pointers

std::vector<Node*> *emptyVec= new vector<Node*> ;
std::vector<Node*> *foundPointers= searchByTag(findVal,MainRoot,emptyVec);

this is part of one of my modules, i need a vector of pointer input to the searchByTag function which appends each value it finds to the "emptyVec"that is passed in.
I want to know if the first statement would lead to a memory leak?
if so is there any way to avoid this?
If I assign the emptyVec = NULL , it gives me an exception when I try to push a value into it.

Would really appreciate it if any of you could help me with this.
Thanks in advance
Why not just declare the vectors as local/member variables and pass them by reference to be filled?

And yes, If you don't delete any memory allocated you will end up with a memory leak.
thank you for your suggestion
I tried passing in by reference and it worked just fine.
Topic archived. No new replies allowed.