Ejemplo n.º 1
0
Field::~Field() {
//Func - Destructor
//Pre  - true
//Post - Instance has been destroyed

    LStringIntern::unintern(_name);
    _CLDELETE_CARRAY(_stringValue);
    _CLDELETE(_readerValue);
    _CLVDELETE( _streamValue );
}
Ejemplo n.º 2
0
void SegmentMergeInfo::close() {
//Func - Closes the the resources
//Pre  - true
//Post - The resources have been closed

    //First make sure posting has been closed
    if ( postings != NULL ){
        postings->close();
        _CLVDELETE(postings); //todo: not a clucene object... should be
    }

    if ( termEnum != NULL ){
        termEnum->close();
        _CLDELETE(termEnum);
    }
	_CLDECDELETE(term);
	_CLDELETE_ARRAY(docMap);
}
Ejemplo n.º 3
0
  bool PhrasePositions::next(){
  //Func - Increments to next doc
  //Pre  - tp != NULL
  //Post - if there was no next then doc = INT_MAX otherwise
  //       doc contains the current document number

      CND_PRECONDITION(tp != NULL,"tp is NULL");
    
	  //Move to the next in TermPositions tp
      if (!tp->next()) {
         //There is no next so close the stream
         tp->close();				  
         //delete tp and reset tp to NULL
         _CLVDELETE(tp); //todo: not a clucene object... should be
         //Assign Doc sentinel value
         doc = INT_MAX; 
         return false;
		}else{
         doc  = tp->doc();
         position = 0;
         return true;
	   }
  }
Ejemplo n.º 4
0
int32_t
closedir (DIR * dirp)
{
	int32_t rc;

	errno = 0;
	rc = 0;

	if (!dirp)
	{
		errno = EFAULT;
		return -1;
	}

	if (dirp->dd_handle != -1)
	{
		rc = _findclose (dirp->dd_handle);
	}

	/* Delete the dir structure. */
	_CLVDELETE(dirp);

	return rc;
}