[gdal-dev] Memory leaks?
Paul Selormey
paul at t...
Mon Aug 26 21:17:18 EDT 2002
Hello Simon,
> Just read Frank's e-mail. He sees the purpose of this function as an aid
> to making hunting for real memory leaks less confusing. But I would have
> thought that any decent memory leak checking software would only flag
> leaks that occur in unreachable memory blocks, which does not include
> those drivers. But it's been a while since I last used Insure for this
> kind of thing.
It might be a personal style, I do not leave the memories I have allocated
for the system to clean up (if I do not know, that is a different story).
I have never used Insure, but this is what Windows-based BoundsChecker
(do not know if you consider is decent memory leak checker) gives:
----------------------------------------------------------------------------
-------------------------------------------
void * __cdecl operator new(unsigned int) (ceosdataset.cpp (206))
GDALRegister_CEOS ceosdataset.cpp 206
void * __cdecl operator new(unsigned int) (elasdataset.cpp (653))
GDALRegister_ELAS elasdataset.cpp 653
void * __cdecl operator new(unsigned int) (aigdataset.cpp (390))
GDALRegister_AIGrid aigdataset.cpp 390
void * __cdecl operator new(unsigned int) (aaigriddataset.cpp (462))
GDALRegister_AAIGrid aaigriddataset.cpp 462
void * __cdecl operator new(unsigned int) (sdtsdataset.cpp (378))
GDALRegister_SDTS sdtsdataset.cpp 378
void * __cdecl operator new(unsigned int) (dteddataset.cpp (399))
GDALRegister_DTED dteddataset.cpp 399
void * __cdecl operator new(unsigned int) (pngdataset.cpp (951))
GDALRegister_PNG pngdataset.cpp 951
void * __cdecl operator new(unsigned int) (jpgdataset.cpp (597))
GDALRegister_JPEG jpgdataset.cpp 597
void * __cdecl operator new(unsigned int) (memdataset.cpp (481))
GDALRegister_MEM memdataset.cpp 481
void * __cdecl operator new(unsigned int) (jdemdataset.cpp (316))
GDALRegister_JDEM jdemdataset.cpp 316
void * __cdecl operator new(unsigned int) (gifdataset.cpp (603))
GDALRegister_GIF gifdataset.cpp 603
void * __cdecl operator new(unsigned int) (envisatdataset.cpp (609))
GDALRegister_Envisat envisatdataset.cpp 609
void * __cdecl operator new(unsigned int) (xpmdataset.cpp (415))
GDALRegister_XPM xpmdataset.cpp 415
void * __cdecl operator new(unsigned int) (pnmdataset.cpp (307))
GDALRegister_PNM pnmdataset.cpp 307
void * __cdecl operator new(unsigned int) (doq1dataset.cpp (363))
GDALRegister_DOQ1 doq1dataset.cpp 363
void * __cdecl operator new(unsigned int) (doq2dataset.cpp (449))
GDALRegister_DOQ2 doq2dataset.cpp 449
void * __cdecl operator new(unsigned int) (envidataset.cpp (786))
GDALRegister_ENVI envidataset.cpp 786
void * __cdecl operator new(unsigned int) (ehdrdataset.cpp (445))
GDALRegister_EHdr ehdrdataset.cpp 445
void * __cdecl operator new(unsigned int) (pauxdataset.cpp (1091))
GDALRegister_PAux pauxdataset.cpp 1091
void * __cdecl operator new(unsigned int) (mffdataset.cpp (874))
GDALRegister_MFF mffdataset.cpp 874
void * __cdecl operator new(unsigned int) (hkvdataset.cpp (1045))
GDALRegister_HKV hkvdataset.cpp 1045
void * __cdecl operator new(unsigned int) (effdataset.cpp (232))
GDALRegister_EFF effdataset.cpp 232
void * __cdecl operator new(unsigned int) (fujibasdataset.cpp (223))
GDALRegister_FujiBAS fujibasdataset.cpp 223
void * __cdecl operator new(unsigned int) (fitdataset.cpp (1285))
GDALRegister_FIT fitdataset.cpp 1285
void * __cdecl operator new(unsigned int) (usgsdemdataset.cpp (584))
GDALRegister_USGSDEM usgsdemdataset.cpp 584
void * __cdecl operator new(unsigned int) (gxfdataset.cpp (310))
GDALRegister_GXF gxfdataset.cpp 310
void * __cdecl operator new(unsigned int) (gdaldrivermanager.cpp (88))
GetGDALDriverManager gdaldrivermanager.cpp 88
_strdup (cpl_vsisimple.cpp (289)) VSIStrdup cpl_vsisimple.cpp 289
void * __cdecl operator new(unsigned int) (vrtdataset.cpp (259))
GDALRegister_VRT vrtdataset.cpp 259
void * __cdecl operator new(unsigned int) (geotiff.cpp (3034))
GDALRegister_GTiff geotiff.cpp 3034
void * __cdecl operator new(unsigned int) (hfadataset.cpp (1700))
GDALRegister_HFA hfadataset.cpp 1700
void * __cdecl operator new(unsigned int) (sar_ceosdataset.cpp (1413))
GDALRegister_SAR_CEOS sar_ceosdataset.cpp 1413
_realloc (cpl_vsisimple.cpp (268)) VSIRealloc cpl_vsisimple.cpp 268
----------------------------------------------------------------------------
-----------------------------------------------------
By your arguments, we could leave any memory allocated, which is used
throughout the lifetime
of the application for the system to clean up - there is hardly a reason to
worry about memory
management in the C++ application.
Best regards,
Paul.
More information about the Gdal-dev
mailing list