I've had a quick look and there are some PLplot specific memory leaks to contend with I think. There also seems to be a lot of wxWidget memory leaks too - not sure if they are related to PLplot code or not.
 
Again I'm using  C++ example 19cc as i had it handy. When the each page is drawn flow doesn't return to the x19 constructor until the page is advanced. This means that if the user closes the window (hitting the x on the top bar) then the program exits via a different path, flow never returns to the example code and the plstream and x19 objects are never deleted.
 
However if we do advance through all the pages and past the last page, flow returns as one might expect and these objects get deleted. There are still a lot of wxWidget related memory leaks though. I'm not sure if some of these could be related to our own code - for example the menus leak memory. These do not have parents passed to them in their constructor so might need explicitly deleting on exit.
 
Phil