Index: src/RandomNumbers/unittests/RandomNumberDistributionFactoryUnitTest.cpp
===================================================================
--- src/RandomNumbers/unittests/RandomNumberDistributionFactoryUnitTest.cpp	(revision 076a7747f6149944af692526338b96c2659d9e53)
+++ src/RandomNumbers/unittests/RandomNumberDistributionFactoryUnitTest.cpp	(revision 9b3476e89c8176ecacfb1a4825157fcc620108b1)
@@ -21,4 +21,6 @@
 
 #include "RandomNumberDistributionFactoryUnitTest.hpp"
+
+#include "RandomNumbers/RandomNumberDistribution.hpp"
 #include "RandomNumbers/RandomNumberDistribution_Encapsulation.hpp"
 #include "RandomNumbers/RandomNumberDistributionFactory.hpp"
@@ -68,4 +70,7 @@
 void RandomNumberDistributionFactoryTest::setUp()
 {
+  rndA = NULL;
+  rndA_1 = NULL;
+  rndA_2 = NULL;
   RandomNumberDistributionFactory::getInstance();
 }
@@ -73,4 +78,7 @@
 void RandomNumberDistributionFactoryTest::tearDown()
 {
+  delete rndA;
+  delete rndA_1;
+  delete rndA_2;
   RandomNumberDistributionFactory::purgeInstance();
 }
@@ -94,11 +102,10 @@
 
   // check one of the distributions in the table
-  RandomNumberDistribution * rnd =
-      RandomNumberDistributionFactory::getInstance().
-      PrototypeTable[RandomNumberDistributionFactory::uniform_smallint]->create();
+  rndA = RandomNumberDistributionFactory::getInstance().
+      PrototypeTable[RandomNumberDistributionFactory::uniform_smallint]->clone();
   CPPUNIT_ASSERT_EQUAL(
       std::string(typeid(boost::uniform_smallint<> ).name()),
-      rnd->name()
+      rndA->name()
   );
-  delete rnd;
 }
+
Index: src/RandomNumbers/unittests/RandomNumberDistributionFactoryUnitTest.hpp
===================================================================
--- src/RandomNumbers/unittests/RandomNumberDistributionFactoryUnitTest.hpp	(revision 076a7747f6149944af692526338b96c2659d9e53)
+++ src/RandomNumbers/unittests/RandomNumberDistributionFactoryUnitTest.hpp	(revision 9b3476e89c8176ecacfb1a4825157fcc620108b1)
@@ -17,4 +17,6 @@
 #include <cppunit/extensions/HelperMacros.h>
 
+class RandomNumberDistribution;
+
 class RandomNumberDistributionFactoryTest : public CppUnit::TestFixture
 {
@@ -30,4 +32,7 @@
 
 private:
+  RandomNumberDistribution * rndA;
+  RandomNumberDistribution * rndA_1;
+  RandomNumberDistribution * rndA_2;
 };
 
Index: src/RandomNumbers/unittests/RandomNumberEngineFactoryUnitTest.cpp
===================================================================
--- src/RandomNumbers/unittests/RandomNumberEngineFactoryUnitTest.cpp	(revision 076a7747f6149944af692526338b96c2659d9e53)
+++ src/RandomNumbers/unittests/RandomNumberEngineFactoryUnitTest.cpp	(revision 9b3476e89c8176ecacfb1a4825157fcc620108b1)
@@ -26,4 +26,5 @@
 #include "RandomNumberEngineFactoryUnitTest.hpp"
 
+#include "RandomNumbers/RandomNumberEngine.hpp"
 #include "RandomNumbers/RandomNumberEngine_Encapsulation.hpp"
 #include "RandomNumbers/RandomNumberEngineFactory.hpp"
@@ -73,4 +74,7 @@
 void RandomNumberEngineFactoryTest::setUp()
 {
+  rndA = NULL;
+  rndA_1 = NULL;
+  rndA_2 = NULL;
   RandomNumberEngineFactory::getInstance();
 }
@@ -78,4 +82,7 @@
 void RandomNumberEngineFactoryTest::tearDown()
 {
+  delete rndA;
+  delete rndA_1;
+  delete rndA_2;
   RandomNumberEngineFactory::purgeInstance();
 }
@@ -99,11 +106,10 @@
 
   // check one of the engines in the table
-  RandomNumberEngine* rng =
-      RandomNumberEngineFactory::getInstance().
-      PrototypeTable[RandomNumberEngineFactory::minstd_rand0]->create();
+  rndA = RandomNumberEngineFactory::getInstance().
+      PrototypeTable[RandomNumberEngineFactory::minstd_rand0]->clone();
   CPPUNIT_ASSERT_EQUAL(
       std::string(typeid(boost::minstd_rand0).name()),
-      rng->name()
+      rndA->name()
   );
-  delete rng;
 }
+
Index: src/RandomNumbers/unittests/RandomNumberEngineFactoryUnitTest.hpp
===================================================================
--- src/RandomNumbers/unittests/RandomNumberEngineFactoryUnitTest.hpp	(revision 076a7747f6149944af692526338b96c2659d9e53)
+++ src/RandomNumbers/unittests/RandomNumberEngineFactoryUnitTest.hpp	(revision 9b3476e89c8176ecacfb1a4825157fcc620108b1)
@@ -17,4 +17,6 @@
 #include <cppunit/extensions/HelperMacros.h>
 
+class RandomNumberEngine;
+
 class RandomNumberEngineFactoryTest : public CppUnit::TestFixture
 {
@@ -30,4 +32,7 @@
 
 private:
+  RandomNumberEngine *rndA;
+  RandomNumberEngine *rndA_1;
+  RandomNumberEngine *rndA_2;
 };
 
