Geophysical Inversion and Modelling Library v1.5.4
Loading...
Searching...
No Matches
GIMLI::deletePtr Struct Reference

#include <gimli.h>

Public Member Functions

template<typename T>
void operator() (T *p)
 

Detailed Description

General template for deleting an object. This is not exception-safe unless you use some kind of smart pointer.
Example: Delete all objects in a container. vector < ptr * > vP; ... // something that fills vP with the new operator. for_each(vP.begin(), vP.end(), deletePtr());