AbstractionAnon, I am aware of that, but the object is deleted at the end of scope. I am doing this within a function that is called by main. I should have done this a different way, but that is how it has to be done.
Then declare it in main and pass it to your function as an argument.
If you call new within your function, the pointer you set will go out of scope when your function exits. If you call new from main, then you're going to have to pass it to your function also. Anytime you call new, you introduce the possibility of introducing a memory leak by not calling delete.