int vsip_corr1d_destroy_f(vsip_corr1d_f *cor); int vsip_ccorr1d_destroy_f(vsip_ccorr1d_f *cor);
This function releases all memory and resources associated with a 1D correlation object that was previously created with vsip_dcorr1d_create_p . It is essential to call this function when you no longer need the correlation object to prevent memory leaks in your signal processing applications.
vsip_dcorr1d_p* cor: Pointer to the 1D correlation object to be destroyed.
Returns 0.
vsip_corr1d_f *corr; int status; vsip_length m = 1024; // Input signal length vsip_length n = 64; // Reference signal length // Create correlation object corr = vsip_corr1d_create_f(m, n, VSIP_SUPPORT_FULL, 100, VSIP_ALG_TIME); if (corr == NULL) { fprintf(stderr, "Error: Could not create correlation object\n"); return -1; } // Use the correlation object for your signal processing // vsip_vview_f *input = vsip_vcreate_f(m, VSIP_MEM_NONE); // vsip_vview_f *reference = vsip_vcreate_f(n, VSIP_MEM_NONE); // vsip_vview_f *result = vsip_vcreate_f(m + n - 1, VSIP_MEM_NONE); // vsip_corr1d_f(corr, input, reference, result); // Destroy correlation object when done vsip_corr1d_destroy_f(corr);