|
From: Jeffrey W. <nol...@gm...> - 2011-09-07 06:31:40
|
Hi Peng, On Wed, Sep 7, 2011 at 2:17 AM, Peng Yu <pen...@gm...> wrote: > Hi, > > valgrind reports that there is possible lost. But it doesn't seem > there should be any lost. Why valgrind reports it as possible lost? Is > there a way to remove such 'possible lost' from the valgrind report? I've found I'll get the same reports when using global objects. If you are using global objects, put them in an accessor function. In an accessor, the dtors will run, and you won't violate C++'s rule on non-local statics (and cross module dependencies). If you are not using globals, then accept my apologies. Jeff |