Added a custom close method that nulls the ssl context memory.