GDAL
|
The class use the destructor to automatically close the resource. More...
#include <cpl_auto_close.h>
Public Member Functions | |
CPLAutoClose (_Ty &ptr, _Dx dt) | |
Constructor. More... | |
~CPLAutoClose () | |
Destructor. | |
The class use the destructor to automatically close the resource.
Example: GDALDatasetH hDset = GDALOpen(path,GA_ReadOnly); CPLAutoClose<GDALDatasetH,void(*)(void*)> autoclosehDset(hDset,GDALClose); Or: GDALDatasetH hDset = GDALOpen(path,GA_ReadOnly); CPL_AUTO_CLOSE_WARP(hDset,GDALClose);
|
inlineexplicit |
Constructor.
ptr | Pointer to the resource object. |
dt | Resource release(close) function. |