Skip to content

Commit

Permalink
Add a finalizer method to the Module template class.
Browse files Browse the repository at this point in the history
  • Loading branch information
timspainNERSC committed Sep 23, 2024
1 parent 954d846 commit b505d7d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion core/src/include/Module.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* @file Module.hpp
*
* @date Feb 14, 2022
* @date 23 Sep 2024
* @author Tim Spain <[email protected]>
*/

Expand Down Expand Up @@ -165,6 +165,15 @@ template <typename I> class Module {
//! Implementation dependent.
static HelpMap& getHelpRecursive(HelpMap& helpMap, bool getAll);

/*!
* Finalizes the Module by setting both pointers to nullptr.
*/
static void finalize()
{
getUniqueInstance(true) = nullptr;
getGenerationFunction() = nullptr;
}

private:
static std::string getDefaultImplementationName();
static fn& getGenerationFunction()
Expand Down

0 comments on commit b505d7d

Please sign in to comment.