retroseq~/Source/retroseq~common.c
void retroseq_free(t_retroseq *x)
{
#ifdef TARGET_IS_MAX
    /* Remove the object from the DSP chain */
    dsp_free((t_pxobject *)x);
#endif

    /* Free allocated dynamic memory */
    clock_free(x->bang_clock);
    clock_free(x->adsr_clock);

    free_memory(x->note_sequence, x->max_sequence_bytes);
    free_memory(x->duration_sequence, x->max_sequence_bytes);

    free_memory(x->shuffle_list, MAXIMUM_SEQUENCE_LENGTH * sizeof(t_atom));

    free_memory(x->adsr, x->adsr_bytes);
    free_memory(x->adsr_out, x->adsr_out_bytes);
    free_memory(x->adsr_list, x->adsr_list_bytes);

    /* Print message to Max window */
    post("retroseq~ • Memory was freed");
}
/* The 'free instance' routine ************************************************/
The 'free instance' routine
The ' free instance ' routine
void retroseq_free(t_retroseq *x)
{
#ifdef TARGET_IS_MAX
    dsp_free((t_pxobject *)x);
#endif
    clock_free(x->bang_clock);
    clock_free(x->adsr_clock);
    free_memory(x->note_sequence, x->max_sequence_bytes);
    free_memory(x->duration_sequence, x->max_sequence_bytes);
    free_memory(x->shuffle_list, MAXIMUM_SEQUENCE_LENGTH * sizeof(t_atom));
    free_memory(x->adsr, x->adsr_bytes);
    free_memory(x->adsr_out, x->adsr_out_bytes);
    free_memory(x->adsr_list, x->adsr_list_bytes);
    post("retroseq~ • Memory was freed");
}
void retroseq_free ( t_retroseq * x ) { #ifdef TARGET_IS_MAX dsp_free ( ( t_pxobject * ) x ) ; #endif clock_free ( x -> bang_clock ) ; clock_free ( x -> adsr_clock ) ; free_memory ( x -> note_sequence , x -> max_sequence_bytes ) ; free_memory ( x -> duration_sequence , x -> max_sequence_bytes ) ; free_memory ( x -> shuffle_list , MAXIMUM_SEQUENCE_LENGTH * sizeof ( t_atom ) ) ; free_memory ( x -> adsr , x -> adsr_bytes ) ; free_memory ( x -> adsr_out , x -> adsr_out_bytes ) ; free_memory ( x -> adsr_list , x -> adsr_list_bytes ) ; post ( " ; }
The 'free instance' routine
The ' free instance ' routine
/* Remove the object from the DSP chain */ /* Free allocated dynamic memory */ /* Print message to Max window */