cleanup

The cleanup method cleans up after an RiCOSConnectionPort object is destroyed.

Signature
void RiCOSConnectionPort_cleanup(
   RiCOSConnectionPort * const me);
Parameters
me

The object to clean up after

Example
void RiCOSConnectionPort_cleanup(
   RiCOSConnectionPort * const me)
{
   if (me==NULL) return;
   RiCOSSocket_cleanup(&me->m_Socket);
   
   /* Assumes you will have only one connection port
      so the data for m_Buf can be freed; if it is not 
      the case, the readFromSockLoop will allocate it. */
   if (me->m_Buf) {
      free(me->m_Buf);
   }
   me->m_BufSize = 0;
}

Feedback