model_server/process/src/MemSeg.h.cxx
//-----------------------------------------------------
// MemorySegment::~MemorySegment
//
// Free a memory segment
//-----------------------------------------------------
:~MemorySegment
Free a memory segment
: ~MemorySegment Free a memory segment
MemorySegment::~MemorySegment()
{
    char segfile[1024];
    strcpy(segfile, name);
    pset_munmap (self, seg_size);
    if ( unit >= 0 )
	OSapi_close (unit);
    unit = -1;		
    if(pmgr_is_slave == 0) {
	char const *debug_segfile = OSapi_getenv (env_debug_segfile);
	if(debug_segfile == 0  ||  strcmp(debug_segfile, segfile))
	    OSapi_unlink (segfile);
    }
#if !defined(__GNUG__) || !defined(__GNUC__) || !defined(__GNUC_MINOR__) || !(__GNUC__==2 && __GNUC_MINOR__ == 6)
#endif    
}
MemorySegment :: ~ MemorySegment ( ) { char segfile [ 1024 ] ; strcpy ( segfile , name ) ; pset_munmap ( self , seg_size ) ; if ( unit >= 0 ) OSapi_close ( unit ) ; unit = -1 ; if ( pmgr_is_slave == 0 ) { char const * debug_segfile = OSapi_getenv ( env_debug_segfile ) ; if ( debug_segfile == 0 || strcmp ( debug_segfile , segfile ) ) OSapi_unlink ( segfile ) ; } #if ! defined ( __GNUG__ ) || ! defined ( __GNUC__ ) || ! defined ( __GNUC_MINOR__ ) || ! ( __GNUC__ == 2 && __GNUC_MINOR__ == 6 ) #endif }
MemorySegment::~MemorySegment
Free a memory segment
MemorySegment :: ~MemorySegment Free a memory segment
// unmap the segment and if we are the master process unlink the segment  // Note - should the segment file be unlinked // !! < //    old_size = 0; // move the following assigment to the calling function. //    this = 0;		// To suppress de-allocation.