The code you posted appears to contain a memory leak. You don't have to worry about destroying those vectors because the vector class will destroy itself when the class or program terminates.
If s1, s2 and s3 are being allocated somewhere else with new operator, then you need to delete them after push_back() is called (after line 19 of the code snippet you posted).
Last edited by Ancient Dragon; May 31st, 2009 at 2:49 pm.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Online 21,947 posts
since Aug 2005