add comments detailing how to free memory allocated by API functions