1detect_obj_free(3)         Library Functions Manual         detect_obj_free(3)
2
3
4

NAME

6       chardet_obj_free - free DetectObject structure
7
8

SNOPSIS

10       #include <chardet.h>
11       void chardet_obj_free (DetectObj **);
12
13

DESCRIPTION

15       Free   resource   of   DetectObject   structure   that   allocated   by
16       chardet_obj_init api
17
18

RETURN VALUE

20       void
21

EXAMPLE

23       #include <chardet.h>
24
25       int main (void) {
26            DetectObj *obj;
27
28            if ( (obj = detect_obj_init ()) == NULL ) {
29                 fprintf (stderr, "Memory Allocation failed\n");
30                 return CHARDET_MEM_ALLOCATED_FAIL;
31            }
32
33            switch (detect ("¾È³çÇϼ¼¿ä", &obj)) {
34                 case CHARDET_OUT_OF_MEMORY :
35                      fprintf (stderr, "On handle processing, occured out of memory\n");
36                      detect_obj_free (&obj);
37                      return CHARDET_OUT_OF_MEMORY;
38                 case CHARDET_NULL_OBJECT :
39                      fprintf (stderr,
40                                "2st argument of chardet() is must memory allocation "
41                                "with detect_obj_init API\n");
42                      return CHARDET_NULL_OBJECT;
43            }
44
45            printf ("encoding: %s, confidence: %f\n", obj->encoding, obj->confidence);
46            detect_obj_free (&obj);
47
48           return 0;
49       }
50
51

AUTHORS

53       JoungKyun.Kim <http://oops.org>
54
55

BUG REPORTS

57       Use QnA board on http://oops.org
58
59

SEE ALSO

61       detect_obj_init(3)
62
63
64
65
66libchardet manuals                2015-12-11                detect_obj_free(3)
Impressum