Minishell
 
Loading...
Searching...
No Matches
Memory Management

Functions to free the allocated memory when it's not needed anymore. More...

Functions

void free_array (t_garbage *garbage, char **array)
 Free array of strings.
 
void free_command (t_garbage *garbage, t_command *command)
 Free one t_command structure with all that it contains.
 
void free_commands (t_garbage *garbage, t_command **command)
 Free t_command linked list structure with all that it contains.
 
void free_files_struct (t_garbage *garbage, t_file *file)
 Free linked list of t_file structure.
 
void free_heredoc (t_garbage *garbage, t_tmp *tmp)
 Free heredoc structure.
 
void free_tokens (t_garbage *garbage, t_token *token)
 Free t_tokens linked list structure.
 

Detailed Description

Functions to free the allocated memory when it's not needed anymore.

Function Documentation

◆ free_array()

void free_array ( t_garbage * garbage,
char ** array )

Free array of strings.

Parameters
garbagegarbage structure
arrayarray of strings
Here is the call graph for this function:

◆ free_command()

void free_command ( t_garbage * garbage,
t_command * command )

Free one t_command structure with all that it contains.

Parameters
garbagegarbage structure
commandt_command structure
Here is the call graph for this function:

◆ free_commands()

void free_commands ( t_garbage * garbage,
t_command ** command )

Free t_command linked list structure with all that it contains.

Parameters
garbagegarbage structure
commandhead of t_command linked list structure
Here is the call graph for this function:

◆ free_files_struct()

void free_files_struct ( t_garbage * garbage,
t_file * file )

Free linked list of t_file structure.

Parameters
garbagegarbage structure
filehead of t_file linked list structure
Here is the call graph for this function:

◆ free_heredoc()

void free_heredoc ( t_garbage * garbage,
t_tmp * tmp )

Free heredoc structure.

Parameters
garbagegarbage structure
tmpheredoc structure
Here is the call graph for this function:

◆ free_tokens()

void free_tokens ( t_garbage * garbage,
t_token * token )

Free t_tokens linked list structure.

Parameters
garbagegarbage structure
tokenhead of t_tokens linked list structure
Here is the call graph for this function: