FIMS  v0.9.3
Loading...
Searching...
No Matches
fims_model_object::FIMSMemoryTracker Struct Reference

FIMS struct that tracks object memory for leak detection. More...

#include <model_object.hpp>

Inheritance diagram for fims_model_object::FIMSMemoryTracker:
fims_model_object::FIMSObject< Type > fims_data_object::DataObject< Type > fims_distributions::DensityComponentBase< Type > fims_popdy::FisheryModelBase< Type > fims_popdy::Fleet< Type > fims_popdy::GrowthBase< Type > fims_popdy::MaturityBase< Type > fims_popdy::Population< Type > fims_popdy::RecruitmentBase< Type > fims_popdy::SelectivityBase< Type >

Public Member Functions

void register_self (const uint32_t id)
 Registers a FIMSObject instance with the memory tracker.
 

Static Public Attributes

static int total_active_objects = 0
 Total number of active FIMSObject instances currently in memory.
 

Detailed Description

FIMS struct that tracks object memory for leak detection.

Member Function Documentation

◆ register_self()

void fims_model_object::FIMSMemoryTracker::register_self ( const uint32_t  id)
inline

Registers a FIMSObject instance with the memory tracker.

Should be called from the constructor of each concrete FIMS class after setting its id, so that the type name and id are both available. Inserts a key of the form "TypeName [id=X]" into active_objects and increments total_active_objects.

Parameters
idThe unique FIMS object id assigned by the derived class.

The documentation for this struct was generated from the following file: