In this unit test, Foo's destructor might be called for multiple elements without initialization.  Add a null constructor for Foo which executes in both spaces, which nulls the flag pointer.  Only set the flag if the Foo object's pointer has set.
In this unit test, Foo's destructor might be called for multiple elements without initialization.  Add a null constructor for Foo which executes in both spaces, which nulls the flag pointer.  Only set the flag if the Foo object's pointer has set.

--HG--
extra : convert_revision : svn%3A83215879-3e5a-4751-8c9d-778f44bb06a5/trunk%40540

jbrownbridge/thrust,jbrownbridge/thrust,jbrownbridge/thrust,jbrownbridge/thrust