From e2645c10604f132929421a816959685ee6b9c2e6 Mon Sep 17 00:00:00 2001 From: "auria.mg" Date: Wed, 28 Mar 2018 19:45:24 -0400 Subject: [PATCH] Fix leak --- src/utils/random_generator.cpp | 6 +++--- src/utils/random_generator.hpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/utils/random_generator.cpp b/src/utils/random_generator.cpp index 6685444e3..54b2371c4 100644 --- a/src/utils/random_generator.cpp +++ b/src/utils/random_generator.cpp @@ -21,17 +21,18 @@ #include #include -std::vector RandomGenerator::m_all_random_generators; +//std::vector RandomGenerator::m_all_random_generators; RandomGenerator::RandomGenerator() { m_a = 1103515245; m_c = 12345; - m_all_random_generators.push_back(this); + //m_all_random_generators.push_back(this); m_random_value = 3141591; } // RandomGenerator // ---------------------------------------------------------------------------- +#if 0 std::vector RandomGenerator::generateAllSeeds() { std::vector all_seeds; @@ -44,7 +45,6 @@ std::vector RandomGenerator::generateAllSeeds() return all_seeds; } // generateAllSeeds -#if 0 // ---------------------------------------------------------------------------- int RandomGenerator::get(int n) diff --git a/src/utils/random_generator.hpp b/src/utils/random_generator.hpp index 9f1805724..67cabed47 100644 --- a/src/utils/random_generator.hpp +++ b/src/utils/random_generator.hpp @@ -40,7 +40,7 @@ private: public: RandomGenerator(); - std::vector generateAllSeeds(); + //std::vector generateAllSeeds(); /** Returns a pseudo random number between 0 and n-1 inclusive */ int get(int n) {return rand() % n; } void seed(int s) {m_random_value = s;}