library/src/buffer_analysis/BP-BufferAnalysis.cc
// destroys any memory associated with a buffer analysis, including that which was generated by any subsystems
destroys any memory associated with a buffer analysis, including that which was generated by any subsystems
destroys any memory associated with a buffer analysis including that which was generated by any subsystems
BP_ERROR_T BP_DestroyBufferAnalysis(P_BP_BUFFER_ANALYSIS analysis)
{
	if(!analysis)
		return ERR_FAILURE;
	if(analysis->ascii)
	{
		if(analysis->ascii->char_map)
			BP_DestroyASCIICharacterMap(analysis->ascii->char_map);
	}
	if(analysis->tq)
	{
		BP_DestroyLinkL(analysis->tq, BP_TRUE);
	}
	bpfree(analysis);
	return ERR_SUCCESS;
}
BP_ERROR_T BP_DestroyBufferAnalysis ( P_BP_BUFFER_ANALYSIS analysis ) { if ( ! analysis ) return ERR_FAILURE ; if ( analysis -> ascii ) { if ( analysis -> ascii -> char_map ) BP_DestroyASCIICharacterMap ( analysis -> ascii -> char_map ) ; } if ( analysis -> tq ) { BP_DestroyLinkL ( analysis -> tq , BP_TRUE ) ; } bpfree ( analysis ) ; return ERR_SUCCESS ; }
destroys any memory associated with a buffer analysis, including that which was generated by any subsystems
destroys any memory associated with a buffer analysis including that which was generated by any subsystems
// exit if no analysis is provided // destroy sub structures first // destroy the char map (only dangling non-tq allocated memory) // destroy the tailqueue allocator // destroy the linkl // destroy the analysis // return indicating success