CbmRoot
|
Functor class for convenient memory release. More...
#include <LitUtils.h>
Public Member Functions | |
template<typename T > | |
void | operator() (const T *ptr) const |
Functor class for convenient memory release.
For example if one has an std::vector<Hit*> of pointers to Hit objects. The hit objects where allocated with new operator than one can release memory with the following code: for_each(hits.begin(), hits.end(), DeleteObject());
[in,out] | par | Reference to track parameters. |
[in] | mat | Reference to material |
Definition at line 58 of file LitUtils.h.
|
inline |
Definition at line 61 of file LitUtils.h.