happy monday all.
please can you verify this life cycle of a struct:
Code:struct test { char *test_string; }; typedef struct test my_test; ... my_test *the_test; the_test = malloc(sizeof(my_test)); the_test->test_string = malloc(sizeof(char) * 15); strcpy(the_test->test_string,"this is a test"); ... free(the_test->test_string); free(the_test);