本文整理汇总了C++中dfree函数的典型用法代码示例。如果您正苦于以下问题:C++ dfree函数的具体用法?C++ dfree怎么用?C++ dfree使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dfree函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: omapi_protocol_destroy
isc_result_t omapi_protocol_destroy (omapi_object_t *h,
const char *file, int line)
{
omapi_protocol_object_t *p;
if (h -> type != omapi_type_protocol)
return ISC_R_INVALIDARG;
p = (omapi_protocol_object_t *)h;
if (p -> message)
omapi_message_dereference (&p -> message, file, line);
/* This will happen if: 1) A default authenticator is supplied to
omapi_protocol_connect(), and 2) something goes wrong before
the authenticator can be opened. */
if (p -> default_auth && !p -> remote_auth_list)
dfree (p -> default_auth, file, line);
while (p -> remote_auth_list) {
omapi_remote_auth_t *r = p -> remote_auth_list -> next;
p -> remote_auth_list = r;
if (r) {
omapi_object_dereference (&r -> a, file, line);
dfree (r, file, line);
}
}
return ISC_R_SUCCESS;
}
示例2: trace_free_all
void trace_free_all ()
{
trace_type_t *tp;
int i;
tp = new_trace_types;
while (tp) {
new_trace_types = tp -> next;
if (tp -> name) {
dfree (tp -> name, MDL);
tp -> name = (char *)0;
}
dfree (tp, MDL);
tp = new_trace_types;
}
for (i = 0; i < trace_type_count; i++) {
if (trace_types [i]) {
if (trace_types [i] -> name)
dfree (trace_types [i] -> name, MDL);
dfree (trace_types [i], MDL);
}
}
dfree (trace_types, MDL);
trace_types = (trace_type_t **)0;
trace_type_count = trace_type_max = 0;
omapi_array_free (&trace_listeners, MDL);
omapi_array_free (&omapi_connections, MDL);
}
示例3: dtfree
void dtfree(datrie *pvdt) {
datrie_t *pdt = (datrie_t *)pvdt;
if (pdt->pwarry_) {
dfree(pdt->pwarry_);
pdt->pwarry_ = NULL;
}
if (pdt->pextra_) {
dfree(pdt->pextra_);
pdt->pextra_ = NULL;
}
if (pdt->peidxs_) {
dfree(pdt->peidxs_);
pdt->peidxs_ = NULL;
}
if (pdt->code_maps_) {
free(pdt->code_maps_);
pdt->code_maps_ = NULL;
}
if (pdt->ord_tree_) {
dfree(pdt->ord_tree_);
pdt->ord_tree_ = NULL;
}
if (pdt->da_trie_) {
free(pdt->da_trie_);
pdt->da_trie_ = NULL;
}
free(pdt);
}
示例4: spr_Destroy
void spr_Destroy(Sprite *pSprite)
{
uint32 i;
if(pSprite->m_pFileIdent)
{
pSprite->m_pFileIdent->m_pData = LTNULL;
}
// Remove ourselves from the m_Sprites lists
dl_Remove(&pSprite->m_Link);
dl_TieOff(&pSprite->m_Link);
if(pSprite->m_Anims)
{
for(i=0; i < pSprite->m_nAnims; i++)
{
if(pSprite->m_Anims[i].m_Frames)
{
dfree(pSprite->m_Anims[i].m_Frames);
}
}
dfree(pSprite->m_Anims);
}
dfree(pSprite);
}
示例5: button_destroy
kucode_t button_destroy( gui_obj_t *obj )
{
gui_button_t *const widget = (gui_button_t*)obj->widget;
pstart();
KU_WITHOUT_ERROR_START();
if ( obj->status > GUI_NOTLOADED )
button_uload(obj);
if ( widget->back_nor_name )
dfree(widget->back_nor_name);
if ( widget->back_mon_name )
dfree(widget->back_mon_name);
if ( widget->back_mdn_name )
dfree(widget->back_mdn_name);
if ( widget->font_name )
dfree(widget->font_name);
if ( widget->caption )
dfree(widget->caption);
KU_WITHOUT_ERROR_STOP();
KU_ERRQ_BLOCKED();
}
示例6: free_aster
/**
Free the ASTER_S array.
*/
void free_aster(ASTER_S *aster, int naster, const PARMS_S *parms){
(void) parms;
for(int iaster=0; iaster<naster; iaster++){
int ndtrat=parms->skyc.ndtrat;
if(aster[iaster].kalman){
if(parms->skyc.multirate){
kalman_free(aster[iaster].kalman[0]);
dcellfreearr(aster[iaster].neam, 1);
}else{
for(int i=0; i<ndtrat; i++){
kalman_free(aster[iaster].kalman[i]);
}
dcellfreearr(aster[iaster].neam, ndtrat);
}
free(aster[iaster].kalman);
aster[iaster].kalman=0;
}
dcellfree(aster[iaster].gain);
dcellfree(aster[iaster].pgm);
dcellfree(aster[iaster].sigman);
dfree(aster[iaster].res_ws);
dfree(aster[iaster].res_ngs);
free(aster[iaster].wfs);
dcellfree(aster[iaster].g);
dfree(aster[iaster].gm);
dfree(aster[iaster].dtrats);
dfree(aster[iaster].idtrats);
free(aster[iaster].ngs);
}
free(aster);
}
示例7: tkey_free
void tkey_free (ns_tsig_key **key)
{
if ((*key) -> data)
dfree ((*key) -> data, MDL);
dfree ((*key), MDL);
*key = (ns_tsig_key *)0;
}
示例8: trace_mr_statp_setup
void trace_mr_statp_setup (res_state statp)
{
unsigned buflen = 0;
char *buf = (char *)0;
isc_result_t status;
int i;
if (trace_playback ()) {
int nscount;
status = trace_get_packet (&trace_mr_statp, &buflen, &buf);
if (status != ISC_R_SUCCESS) {
log_error ("trace_mr_statp: no statp packet found.");
return;
}
nscount = buflen / sizeof (struct in_addr);
if (nscount * (sizeof (struct in_addr)) != buflen ||
nscount < 1) {
log_error ("trace_mr_statp: bogus length: %d",
buflen);
return;
}
if (nscount > MAXNS)
nscount = MAXNS;
for (i = 0; i < nscount; i++) {
#if defined (HAVE_SA_LEN)
statp -> nsaddr_list [i].sin_len =
sizeof (struct sockaddr_in);
#endif
memset (&statp -> nsaddr_list [i].sin_zero, 0,
sizeof statp -> nsaddr_list [i].sin_zero);
statp -> nsaddr_list [i].sin_port = htons (53); /*XXX*/
statp -> nsaddr_list [i].sin_family = AF_INET;
memcpy (&statp -> nsaddr_list [i].sin_addr,
(buf + i * (sizeof (struct in_addr))),
sizeof (struct in_addr));
}
statp -> nscount = nscount;
dfree (buf, MDL);
buf = (char *)0;
}
if (trace_record ()) {
trace_iov_t *iov;
iov = dmalloc ((statp -> nscount *
sizeof (trace_iov_t)), MDL);
if (!iov) {
trace_stop ();
log_error ("No memory for statp iov.");
return;
}
for (i = 0; i < statp -> nscount; i++) {
iov [i].buf =
(char *)&statp -> nsaddr_list [i].sin_addr;
iov [i].len = sizeof (struct in_addr);
}
trace_write_packet_iov (trace_mr_statp, i, iov, MDL);
dfree (iov, MDL);
}
}
示例9: servo_calc_free
static void servo_calc_free(SERVO_CALC_T *st){
cfree(st->s);
cfree(st->Hol);
cfree(st->Hint);
cfree(st->Hsys);
cfree(st->Hwfs);
dfree(st->nu);
dfree(st->psd);
}
示例10: dsdict_remove
void dsdict_remove(dsdict* dict, const char* key) {
dsdict_node* node = dsdict_iter(dict, key);
if (node) {
dfree(node->key);
dfree(node->value);
list_erase(dict, node);
free(node);
}
}
示例11: testdfull
void testdfull (void)
//*************************************************************************
//
//*************************************************************************
{
if ( (dfree(".", 0) < HOMEDISKFULL)
|| (dfree(m.userpath, 0) < USERDISKFULL)
|| (dfree(m.infopath, 0) < INFODISKFULL))
putf("***************** HDD is full ******************\n");
}
示例12: servo_free
/**
Free SERVO_T struct
*/
void servo_free(SERVO_T *st){
if(!st) return;
dcellfree(st->mlead);
dcellfree(st->merrlast);
dcellfree(st->mpreint);
cellfree(st->merrhist);
cellfree(st->mint);
dfree(st->ap);
dfree(st->ep);
free(st);
}
示例13: dsdict_free
void dsdict_free(dsdict* dict) {
dsdict_node* n = dict->front;
while (dict->front) {
n = dict->front;
dfree(n->key);
dfree(n->value);
dict->front = n->next;
free(n);
}
free(dict);
}
示例14: isc_heap_destroy
void
isc_heap_destroy(isc_heap_t **heapp) {
isc_heap_t *heap;
REQUIRE(heapp != NULL);
heap = *heapp;
if (heap->array != NULL)
dfree(heap->array, MDL);
dfree(heap, MDL);
*heapp = NULL;
}
示例15: trace_get_file
isc_result_t trace_get_file (trace_type_t *ttype,
const char *filename, unsigned *len, char **buf)
{
fpos_t curpos;
unsigned max = 0;
tracepacket_t *tpkt;
int status;
isc_result_t result;
/* Disallow some obvious bogosities. */
if (!buf || !len || *buf)
return DHCP_R_INVALIDARG;
/* Save file position in case of filename mismatch. */
status = fgetpos (traceinfile, &curpos);
if (status < 0)
log_error ("Can't save tracefile position: %m");
tpkt = dmalloc ((unsigned)tracefile_header.phlen, MDL);
if (!tpkt) {
log_error ("can't allocate trace packet header.");
return ISC_R_NOMEMORY;
}
result = trace_get_next_packet (&ttype, tpkt, buf, len, &max);
/* done with tpkt, free it */
dfree (tpkt, MDL);
if (result != ISC_R_SUCCESS) {
if (*buf) {
dfree (*buf, MDL);
*buf = NULL;
}
return result;
}
/* Make sure the filename is right. */
if (strcmp (filename, *buf)) {
log_error ("Read file %s when expecting %s", *buf, filename);
dfree (*buf, MDL);
*buf = NULL;
status = fsetpos (traceinfile, &curpos);
if (status < 0) {
log_error ("fsetpos in tracefile failed: %m");
return DHCP_R_PROTOCOLERROR;
}
return ISC_R_UNEXPECTEDTOKEN;
}
return ISC_R_SUCCESS;
}