PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ SHPClose()

void SHPAPI_CALL SHPClose ( SHPHandle  psSHP)

Definition at line 759 of file shpopen.c.

761 {
762  if( psSHP == NULL )
763  return;
764 
765 /* -------------------------------------------------------------------- */
766 /* Update the header if we have modified anything. */
767 /* -------------------------------------------------------------------- */
768  if( psSHP->bUpdated )
769  SHPWriteHeader( psSHP );
770 
771 /* -------------------------------------------------------------------- */
772 /* Free all resources, and close files. */
773 /* -------------------------------------------------------------------- */
774  free( psSHP->panRecOffset );
775  free( psSHP->panRecSize );
776 
777  if ( psSHP->fpSHX != NULL)
778  psSHP->sHooks.FClose( psSHP->fpSHX );
779  psSHP->sHooks.FClose( psSHP->fpSHP );
780 
781  if( psSHP->pabyRec != NULL )
782  {
783  free( psSHP->pabyRec );
784  }
785 
786  free( psSHP );
787 }
void free(void *)
void SHPAPI_CALL SHPWriteHeader(SHPHandle psSHP)
Definition: shpopen.c:339
int(* FClose)(SAFile file)
Definition: shapefil.h:261
SAFile fpSHX
Definition: shapefil.h:281
SAFile fpSHP
Definition: shapefil.h:280
unsigned int * panRecSize
Definition: shapefil.h:290
SAHooks sHooks
Definition: shapefil.h:278
int bUpdated
Definition: shapefil.h:295
unsigned int * panRecOffset
Definition: shapefil.h:289
unsigned char * pabyRec
Definition: shapefil.h:297

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

Referenced by ShpDumperCloseTable(), and ShpLoaderDestroy().

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