On Wed, Sep 7, 2011 at 1:31 AM, Jeffrey Walton <[email protected]> wrote:
> Hi Peng,
>
> On Wed, Sep 7, 2011 at 2:17 AM, Peng Yu <[email protected]> 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).

I don't exactly following your instructions. Would you please show me
an concrete example on how to change my simple test code? Thanks!

-- 
Regards,
Peng

------------------------------------------------------------------------------
Using storage to extend the benefits of virtualization and iSCSI
Virtualization increases hardware utilization and delivers a new level of
agility. Learn what those decisions are and how to modernize your storage 
and backup environments for virtualization.
http://www.accelacomm.com/jaw/sfnl/114/51434361/
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to