本文整理汇总了C++中AJFREE函数的典型用法代码示例。如果您正苦于以下问题:C++ AJFREE函数的具体用法?C++ AJFREE怎么用?C++ AJFREE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了AJFREE函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ajRegFree
void ajRegFree(AjPRegexp* pexp)
{
AjPRegexp exp;
if(!pexp)
return;
if(!*pexp)
return;
exp = *pexp;
/*
ajDebug("ajRegFree %x size regexp %d\n", exp,
(ajint) sizeof(exp));
*/
regFreeCount += 1;
regFree += sizeof(*exp);
if(exp->pcre)
regFree += sizeof(exp->pcre);
if(exp->extra)
regFree += sizeof(exp->extra);
regTotal --;
AJFREE(exp->pcre);
AJFREE(exp->extra);
AJFREE(exp->ovector);
AJFREE(*pexp);
return;
}
示例2: ajHistDel
void ajHistDel(AjPHist* phist)
{
ajuint i;
AjPHist hist;
if(!phist) return;
hist = *phist;
if (!hist)
return;
for(i=0;i<hist->numofsets; i++)
{
if(hist->hists[i]->deletedata)
{
ajStrDel(&hist->hists[i]->title);
ajStrDel(&hist->hists[i]->xaxis);
ajStrDel(&hist->hists[i]->yaxis);
AJFREE(hist->hists[i]->data);
}
AJFREE((hist->hists[i]));
}
AJFREE(hist->hists);
ajStrDel(&hist->title);
ajStrDel(&hist->xaxis);
ajStrDel(&hist->yaxisleft);
ajStrDel(&hist->yaxisright);
AJFREE(*phist);
return;
}
示例3: remap_DelTable
static void remap_DelTable(AjPTable * table)
{
void **keyarray = NULL; /* array for table */
void **valarray = NULL; /* array for table */
ajint i;
PValue value;
if(ajTableGetLength(*table))
{
ajTableToarrayKeysValues(*table, &keyarray, &valarray);
for(i = 0; keyarray[i]; i++)
{
value = (PValue) valarray[i];
ajStrDel(&(value->iso));
AJFREE(valarray[i]); /* free the ajint* value */
ajStrDel((AjPStr*)&keyarray[i]);
}
AJFREE(keyarray);
AJFREE(valarray);
}
ajTableFree(table);
return;
}
示例4: ajXmlDel
void ajXmlDel(AjPXml *Pxml)
{
AjPXml xml;
if(!Pxml) return;
if(!(*Pxml)) return;
xml = *Pxml;
ajStrDel(&xml->Id);
ajStrDel(&xml->Db);
ajStrDel(&xml->Setdb);
ajStrDel(&xml->Full);
ajStrDel(&xml->Qry);
ajStrDel(&xml->Formatstr);
ajStrDel(&xml->Filename);
ajStrDel(&xml->TextPtr);
if(xml->Doc)
ajDomDocumentDestroyNode(xml->Doc, &xml->Doc);
AJFREE(*Pxml);
*Pxml = NULL;
return;
}
示例5: dbiblast_dbfree
static void dbiblast_dbfree( PBlastDb* pdb)
{
PBlastDb db;
if(!pdb)
return;
if(!*pdb)
return;
db = *pdb;
dbiblast_memfclosefile(&db->TFile);
dbiblast_memfclosefile(&db->HFile);
dbiblast_memfclosefile(&db->SFile);
dbiblast_memfclosefile(&db->FFile);
ajStrDel(&db->Name);
ajStrDel(&db->Date);
ajStrDel(&db->Title);
AJFREE(*pdb);
return;
}
示例6: prima_PrimerDel
static void prima_PrimerDel(PPrimer *p)
{
ajStrDel(&((*p)->substr));
AJFREE(*p);
return;
}
示例7: ajRefseqDel
void ajRefseqDel(AjPRefseq *Prefseq)
{
AjPRefseq refseq;
AjPSeqRange tmprange;
if(!Prefseq) return;
if(!(*Prefseq)) return;
refseq = *Prefseq;
ajStrDel(&refseq->Id);
ajStrDel(&refseq->Db);
ajStrDel(&refseq->Setdb);
ajStrDel(&refseq->Full);
ajStrDel(&refseq->Qry);
ajStrDel(&refseq->Formatstr);
ajStrDel(&refseq->Filename);
ajStrDel(&refseq->TextPtr);
ajStrDel(&refseq->Desc);
ajStrDel(&refseq->Seq);
while(ajListPop(refseq->Seqlist,(void **)&tmprange))
ajSeqrangeDel(&tmprange);
ajListFree(&refseq->Seqlist);
AJFREE(*Prefseq);
*Prefseq = NULL;
return;
}
示例8: embPropMolwtDel
void embPropMolwtDel(EmbPPropMolwt **thys)
{
EmbPPropMolwt *pthis = NULL;
ajuint i;
pthis = *thys;
for(i=0; i < EMBPROPSIZE + 2; ++i)
AJFREE(pthis[i]);
AJFREE(pthis);
*thys = NULL;
return;
}
示例9: embPropAminoDel
void embPropAminoDel(EmbPPropAmino **thys)
{
EmbPPropAmino *pthis = NULL;
ajuint i;
pthis = *thys;
for(i=0; i < EMBPROPSIZE; ++i)
AJFREE(pthis[i]);
AJFREE(pthis);
*thys = NULL;
return;
}
示例10: ajRegCompC
AjPRegexp ajRegCompC(const char* rexp)
{
AjPRegexp ret;
int options = 0;
int errpos = 0;
const char *errptr = NULL;
const unsigned char *tableptr = NULL;
AJNEW0(ret);
AJCNEW0(ret->ovector, AJREG_OVECSIZE);
ret->ovecsize = AJREG_OVECSIZE/3;
ret->pcre = pcre_compile(rexp, options, &errptr, &errpos, tableptr);
if(!ret->pcre)
{
ajErr("Failed to compile regular expression '%s' at position %d: %s",
rexp, errpos, errptr);
AJFREE(ret);
return NULL;
}
regAlloc += sizeof(ret);
regCount ++;
regTotal ++;
/*ajDebug("ajRegCompC %x size %d regexp '%s'\n",
ret, (int) sizeof(ret), rexp);*/
return ret;
}
示例11: embIeppKDel
void embIeppKDel(double *pK)
{
AJFREE(pK);
return;
}
示例12: assemSAMGetReadgroupHeaderlines
static const AjPStr assemSAMGetReadgroupHeaderlines(const AjPAssem assem)
{
AjPStr* rgids = NULL;
const AjPAssemReadgroup rg = NULL;
ajint i =0;
ajTableToarrayKeys(assem->Readgroups, (void***)&rgids);
ajStrAssignC(&assemoutSamLinetxt, "");
while (rgids[i]) /* read groups */
{
rg = ajTableFetchS(assem->Readgroups, rgids[i++]);
ajFmtPrintAppS(&assemoutSamLinetxt, "@RG\tID:%S", rg->ID);
if(rg->CN)
ajFmtPrintAppS(&assemoutSamLinetxt, "\tCN:%S", rg->CN);
if(rg->Desc)
ajFmtPrintAppS(&assemoutSamLinetxt, "\tDS:%S", rg->Desc);
if(rg->Date)
ajFmtPrintAppS(&assemoutSamLinetxt, "\tDT:%S", rg->Date);
if(rg->FlowOrder)
ajFmtPrintAppS(&assemoutSamLinetxt, "\tFO:%S", rg->FlowOrder);
if(rg->KeySeq)
ajFmtPrintAppS(&assemoutSamLinetxt, "\tKS:%S", rg->KeySeq);
if(rg->Library)
ajFmtPrintAppS(&assemoutSamLinetxt, "\tLB:%S", rg->Library);
if(rg->Programs)
ajFmtPrintAppS(&assemoutSamLinetxt, "\tPG:%S", rg->Programs);
if(rg->Isize)
ajFmtPrintAppS(&assemoutSamLinetxt, "\tPI:%d", rg->Isize);
if(rg->Platform)
ajFmtPrintAppS(&assemoutSamLinetxt, "\tPL:%s",
ajAssemreadgroupGetPlatformname(rg));
if(rg->Unit)
ajFmtPrintAppS(&assemoutSamLinetxt, "\tPU:%S", rg->Unit);
if(rg->Sample)
ajFmtPrintAppS(&assemoutSamLinetxt, "\tSM:%S", rg->Sample);
ajStrAppendC(&assemoutSamLinetxt, "\n");
}
AJFREE(rgids);
return assemoutSamLinetxt;
}
示例13: prima_prune_nearby
static void prima_prune_nearby(AjPList pairlist, ajint *npair, ajint range)
{
PPair pair;
ajint count;
ajint fst;
ajint fst2;
ajint blim;
ajint blim2;
ajint elim;
ajint elim2;
ajint i;
ajint j;
ajint len;
for(i=0;i<*npair;++i)
{
for(j=0;j<i;++j) /* Ignore those already processed */
{
ajListPop(pairlist,(void **)&pair);
ajListPushAppend(pairlist,(void *)pair);
}
ajListPop(pairlist,(void **)&pair);/* Get next high scoring pair */
len = pair->f->primerlen;
fst = pair->f->start + len -1;
blim = fst-range;
elim = fst+range;
len = pair->r->primerlen;
blim2 = pair->r->start - range;
elim2 = pair->r->start + range;
ajListPushAppend(pairlist,(void *)pair);
count = *npair;
for(j=i+1;j<*npair;++j)
{
ajListPop(pairlist,(void **)&pair);
fst2=pair->f->start+pair->f->primerlen-1;
if((fst2<blim || fst2>elim) && (pair->r->start<blim2 ||
pair->r->start>elim2))
ajListPushAppend(pairlist,(void *)pair);
else
{
prima_PrimerDel(&pair->f);
prima_PrimerDel(&pair->r);
AJFREE(pair);
--count;
}
}
*npair = count;
}
return;
}