Changeset e6fdbe


Ignore:
Timestamp:
Feb 26, 2010, 10:02:12 AM (15 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
Children:
706f9b, a1510d
Parents:
5e5283
Message:

MEMLEAK: In many tests World, MemoryUsageObserver, logger or errorLogger being singletons were instantiated but not destroyed.

  • in some cases respective includes had to be added.
Location:
src/unittests
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • src/unittests/AnalysisCorrelationToPointUnitTest.cpp

    r5e5283 re6fdbe  
    2424#include "periodentafel.hpp"
    2525#include "tesselation.hpp"
     26#include "World.hpp"
    2627
    2728#ifdef HAVE_TESTRUNNER
     
    107108  delete(tafel);
    108109  // note that element is cleaned by periodentafel
     110  World::destroy();
     111  MemoryUsageObserver::purgeInstance();
     112  logger::purgeInstance();
    109113};
    110114
  • src/unittests/AnalysisCorrelationToSurfaceUnitTest.cpp

    r5e5283 re6fdbe  
    2424#include "periodentafel.hpp"
    2525#include "tesselation.hpp"
     26#include "World.hpp"
    2627
    2728#ifdef HAVE_TESTRUNNER
     
    137138  delete(tafel);
    138139  // note that element is cleaned by periodentafel
     140  World::destroy();
     141  MemoryUsageObserver::purgeInstance();
     142  logger::purgeInstance();
    139143};
    140144
  • src/unittests/AnalysisPairCorrelationUnitTest.cpp

    r5e5283 re6fdbe  
    2424#include "periodentafel.hpp"
    2525#include "tesselation.hpp"
     26#include "World.hpp"
    2627
    2728#ifdef HAVE_TESTRUNNER
     
    102103  delete(tafel);
    103104  // note that element is cleaned by periodentafel
     105  World::destroy();
     106  MemoryUsageObserver::purgeInstance();
     107  logger::purgeInstance();
     108  errorLogger::purgeInstance();
    104109};
    105110
  • src/unittests/bondgraphunittest.cpp

    r5e5283 re6fdbe  
    2323#include "periodentafel.hpp"
    2424#include "bondgraphunittest.hpp"
     25#include "World.hpp"
    2526
    2627#ifdef HAVE_TESTRUNNER
     
    104105  delete(tafel);
    105106  // note that element is cleaned by periodentafel
     107  World::destroy();
     108  MemoryUsageObserver::purgeInstance();
     109  logger::purgeInstance();
    106110};
    107111
  • src/unittests/infounittest.cpp

    r5e5283 re6fdbe  
    1717#include "info.hpp"
    1818#include "infounittest.hpp"
     19#include "log.hpp"
    1920
    2021#ifdef HAVE_TESTRUNNER
     
    3536void InfoTest::tearDown()
    3637{
     38  logger::purgeInstance();
    3739};
    3840
  • src/unittests/listofbondsunittest.cpp

    r5e5283 re6fdbe  
    2121#include "molecule.hpp"
    2222#include "periodentafel.hpp"
     23#include "World.hpp"
    2324
    2425#ifdef HAVE_TESTRUNNER
     
    8485  delete(tafel);
    8586  // note that element is cleaned by periodentafel
     87  World::destroy();
     88  MemoryUsageObserver::purgeInstance();
     89  logger::purgeInstance();
    8690};
    8791
  • src/unittests/logunittest.cpp

    r5e5283 re6fdbe  
    3131void LogTest::tearDown()
    3232{
     33  logger::purgeInstance();
     34  errorLogger::purgeInstance();
    3335};
    3436
  • src/unittests/memoryallocatorunittest.cpp

    r5e5283 re6fdbe  
    1313#include "memoryallocatorunittest.hpp"
    1414#include "helpers.hpp"
     15#include "log.hpp"
    1516#include "defs.hpp"
    1617
     
    3334{
    3435  MemoryUsageObserver::getInstance()->purgeInstance();
     36  logger::purgeInstance();
    3537};
    3638
  • src/unittests/stackclassunittest.cpp

    r5e5283 re6fdbe  
    3737  Stack->ClearStack();
    3838  delete(Stack);
     39  MemoryUsageObserver::purgeInstance();
     40  logger::purgeInstance();
    3941};
    4042
  • src/unittests/vectorunittest.cpp

    r5e5283 re6fdbe  
    1414
    1515#include "defs.hpp"
     16#include "log.hpp"
     17#include "memoryusageobserver.hpp"
    1618#include "vector.hpp"
    1719#include "vectorunittest.hpp"
     
    3941void VectorTest::tearDown()
    4042{
     43  MemoryUsageObserver::purgeInstance();
     44  logger::purgeInstance();
     45  errorLogger::purgeInstance();
    4146};
    4247
Note: See TracChangeset for help on using the changeset viewer.