FEDEM Solver  R8.0
Source code of the dynamics solver
Functions
releaseSingeltons.C File Reference

Cleaning of global heap-allocated objects on program exit. More...

#include "FFlLib/FFlInit.H"
#include "FFaLib/FFaCmdLineArg/FFaCmdLineArg.H"
#include "FFaLib/FFaDefinitions/FFaMsg.H"
Include dependency graph for releaseSingeltons.C:

Functions

void releaseSingeltons (bool lastPart)
 Helper function to release all global heap-allocated objects on exit. More...
 

Detailed Description

Cleaning of global heap-allocated objects on program exit.

Function Documentation

◆ releaseSingeltons()

void releaseSingeltons ( bool  lastPart)

Helper function to release all global heap-allocated objects on exit.

Parameters
[in]lastPartIf true, also release the FE library singeltons.

This function is used to deallocate the singelton objects that may have been allocated on program exit, mostly to make sure the heap is clean when exiting and enable easier detection of other (real) memory leaks. Set lastPart to false if the reducePart() function is going to be invoked again in the same session. The FFl and FFaCmdLineArg objects are then not released as they are only initialized on startup.