PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ SHPClose()

void SHPAPI_CALL SHPClose ( SHPHandle  hSHP)

Definition at line 888 of file shpopen.c.

890{
891 if( psSHP == SHPLIB_NULLPTR )
892 return;
893
894/* -------------------------------------------------------------------- */
895/* Update the header if we have modified anything. */
896/* -------------------------------------------------------------------- */
897 if( psSHP->bUpdated )
898 SHPWriteHeader( psSHP );
899
900/* -------------------------------------------------------------------- */
901/* Free all resources, and close files. */
902/* -------------------------------------------------------------------- */
903 free( psSHP->panRecOffset );
904 free( psSHP->panRecSize );
905
906 if ( psSHP->fpSHX != SHPLIB_NULLPTR)
907 psSHP->sHooks.FClose( psSHP->fpSHX );
908 psSHP->sHooks.FClose( psSHP->fpSHP );
909
910 if( psSHP->pabyRec != SHPLIB_NULLPTR )
911 {
912 free( psSHP->pabyRec );
913 }
914
915 if( psSHP->pabyObjectBuf != SHPLIB_NULLPTR )
916 {
917 free( psSHP->pabyObjectBuf );
918 }
919 if( psSHP->psCachedObject != SHPLIB_NULLPTR )
920 {
921 free( psSHP->psCachedObject );
922 }
923
924 free( psSHP );
925}
void free(void *)
void SHPAPI_CALL SHPWriteHeader(SHPHandle psSHP)
Definition shpopen.c:147
#define SHPLIB_NULLPTR
Definition shpopen.c:101

References SHPInfo::bUpdated, SAHooks::FClose, SHPInfo::fpSHP, SHPInfo::fpSHX, free(), SHPInfo::pabyObjectBuf, SHPInfo::pabyRec, SHPInfo::panRecOffset, SHPInfo::panRecSize, SHPInfo::psCachedObject, SHPInfo::sHooks, SHPLIB_NULLPTR, and SHPWriteHeader().

Referenced by ShpDumperCloseTable(), ShpLoaderDestroy(), and SHPOpenLL().

Here is the call graph for this function:
Here is the caller graph for this function: