cleanup allocated pointers, still segfaults for the time being on disposing context