Hi, > Hi Oliver, > > On Mon, 2005-09-26 at 16:27 +0200, Oliver Kutter wrote: > > Hi, > > > > I have a problem with memory leaks in my application. I'm doing a > > streamline visualization (as GL_LINE_STRIP) with a variable number of > > geometries (from 50 up to 5000 streamlines). Every streamline is stored > > in its own geometry. [snip] > > Has anyone an idea? > > Clear() might not always help, that depends on the STL implementation. > Some just keep the memory around for next time the array grows.
how to get rid of the internal storage of a stl vector is explained here: http://www.gotw.ca/gotw/054.htm (near the end of the article). basic idea is to swap contents with an empty temporary vector, that then goes out of scope and takes the storage with it. Regards, Carsten -- Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko! Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
