PostGIS  3.1.6dev-r@@SVN_REVISION@@

◆ SHPClose()

void SHPAPI_CALL SHPClose ( SHPHandle  hSHP)

Definition at line 881 of file shpopen.c.

883 {
884  if( psSHP == SHPLIB_NULLPTR )
885  return;
886 
887 /* -------------------------------------------------------------------- */
888 /* Update the header if we have modified anything. */
889 /* -------------------------------------------------------------------- */
890  if( psSHP->bUpdated )
891  SHPWriteHeader( psSHP );
892 
893 /* -------------------------------------------------------------------- */
894 /* Free all resources, and close files. */
895 /* -------------------------------------------------------------------- */
896  free( psSHP->panRecOffset );
897  free( psSHP->panRecSize );
898 
899  if ( psSHP->fpSHX != SHPLIB_NULLPTR)
900  psSHP->sHooks.FClose( psSHP->fpSHX );
901  psSHP->sHooks.FClose( psSHP->fpSHP );
902 
903  if( psSHP->pabyRec != SHPLIB_NULLPTR )
904  {
905  free( psSHP->pabyRec );
906  }
907 
908  if( psSHP->pabyObjectBuf != SHPLIB_NULLPTR )
909  {
910  free( psSHP->pabyObjectBuf );
911  }
912  if( psSHP->psCachedObject != SHPLIB_NULLPTR )
913  {
914  free( psSHP->psCachedObject );
915  }
916 
917  free( psSHP );
918 }
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: