NeoMutt  2024-12-12-14-g7b49f7
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
mdata_free()

Free the private data attached to the Menu. More...

+ Collaboration diagram for mdata_free():

Functions

void attach_private_data_free (struct Menu *menu, void **ptr)
 Free the Attach Data - Implements Menu::mdata_free() -.
 
void autocrypt_data_free (struct Menu *menu, void **ptr)
 Free Autocrypt Data - Implements Menu::mdata_free() -.
 
void attach_data_free (struct Menu *menu, void **ptr)
 Free the Compose Attach Data - Implements Menu::mdata_free() -.
 
void pattern_data_free (struct Menu *menu, void **ptr)
 Free Pattern Data - Implements Menu::mdata_free() -.
 

Detailed Description

Free the private data attached to the Menu.

Parameters
menuMenu
ptrMenu data to free
Precondition
menu is not NULL
ptr is not NULL
*ptr is not NULL

Function Documentation

◆ attach_private_data_free()

void attach_private_data_free ( struct Menu menu,
void **  ptr 
)

Free the Attach Data - Implements Menu::mdata_free() -.

Parameters
menuMenu
ptrAttach Data to free

Definition at line 38 of file private_data.c.

39{
40 if (!ptr || !*ptr)
41 return;
42
43 FREE(ptr);
44}
#define FREE(x)
Definition: memory.h:55
+ Here is the caller graph for this function:

◆ autocrypt_data_free()

void autocrypt_data_free ( struct Menu menu,
void **  ptr 
)

Free Autocrypt Data - Implements Menu::mdata_free() -.

Definition at line 72 of file autocrypt_data.c.

73{
74 if (!ptr || !*ptr)
75 return;
76
77 struct AutocryptData *ad = *ptr;
79
80 FREE(ptr);
81}
void account_entry_array_clear(struct AccountEntryArray *entries)
Clear an AccountEntry array.
Data to pass to the Autocrypt Functions.
struct AccountEntryArray entries
Account Entries.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ attach_data_free()

void attach_data_free ( struct Menu menu,
void **  ptr 
)

Free the Compose Attach Data - Implements Menu::mdata_free() -.

Definition at line 37 of file attach_data.c.

38{
39 if (!ptr || !*ptr)
40 return;
41
42 struct ComposeAttachData *attach_data = *ptr;
43
44 mutt_actx_free(&attach_data->actx);
45
46 FREE(ptr);
47}
void mutt_actx_free(struct AttachCtx **ptr)
Free an Attachment Context.
Definition: attach.c:198
Data to fill the Compose Attach Window.
Definition: attach_data.h:33
struct AttachCtx * actx
Set of attachments.
Definition: attach_data.h:34
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pattern_data_free()

void pattern_data_free ( struct Menu menu,
void **  ptr 
)

Free Pattern Data - Implements Menu::mdata_free() -.

Definition at line 49 of file pattern_data.c.

50{
51 if (!ptr || !*ptr)
52 return;
53
54 struct PatternData *pd = *ptr;
55
56 struct PatternEntry *pe = NULL;
57 ARRAY_FOREACH(pe, &pd->entries)
58 {
59 FREE(&pe->tag);
60 FREE(&pe->expr);
61 FREE(&pe->desc);
62 }
63
64 ARRAY_FREE(&pd->entries);
65 FREE(ptr);
66}
#define ARRAY_FOREACH(elem, head)
Iterate over all elements of the array.
Definition: array.h:212
#define ARRAY_FREE(head)
Release all memory.
Definition: array.h:204
Data to pass to the Pattern Functions.
Definition: pattern_data.h:47
struct PatternEntryArray entries
Patterns for the Menu.
Definition: pattern_data.h:52
A line in the Pattern Completion menu.
Definition: pattern_data.h:35
const char * desc
Description of pattern.
Definition: pattern_data.h:39
const char * tag
Copied to buffer if selected.
Definition: pattern_data.h:37
const char * expr
Displayed in the menu.
Definition: pattern_data.h:38
+ Here is the caller graph for this function: