Logo Search packages:      
Sourcecode: zbar version File versions  Download package

void zbar_image_scanner_destroy ( zbar_image_scanner_t scanner  ) 

destructor.

Definition at line 490 of file img_scanner.c.

References zbar_decoder_destroy(), zbar_image_scanner_destroy(), zbar_scanner_destroy(), and zbar_symbol_set_ref().

Referenced by zbar_image_scanner_create(), zbar_image_scanner_destroy(), and zbar_processor_destroy().

{
    dump_stats(iscn);
    if(iscn->syms) {
        if(iscn->syms->refcnt)
            zbar_symbol_set_ref(iscn->syms, -1);
        else
            _zbar_symbol_set_free(iscn->syms);
        iscn->syms = NULL;
    }
    if(iscn->scn)
        zbar_scanner_destroy(iscn->scn);
    iscn->scn = NULL;
    if(iscn->dcode)
        zbar_decoder_destroy(iscn->dcode);
    iscn->dcode = NULL;
    int i;
    for(i = 0; i < RECYCLE_BUCKETS; i++) {
        zbar_symbol_t *sym, *next;
        for(sym = iscn->recycle[i].head; sym; sym = next) {
            next = sym->next;
            _zbar_symbol_free(sym);
        }
    }
#ifdef ENABLE_QRCODE
    if(iscn->qr) {
        _zbar_qr_destroy(iscn->qr);
        iscn->qr = NULL;
    }
#endif
    free(iscn);
}


Generated by  Doxygen 1.6.0   Back to index