MamaSource::~MamaSource ()
    {
        mamaTry (mamaSource_destroy (mySource));

        if (mySubs)
        {
            wtable_destroy (mySubs);
        }
    }
Example #2
0
    MamaSource::~MamaSource ()
    {
        if (NULL != mySource)
            mamaSource_destroy (mySource);

        if (mySubs)
        {
            wtable_destroy (mySubs);
        }
    }
Example #3
0
void mamaDQPublisherManager_destroy (mamaDQPublisherManager manager)
{
    /* Get the impl. */
    mamaDQPublisherManagerImpl* impl  = (mamaDQPublisherManagerImpl*) manager;
    if(NULL != impl)
    {
        /* Destroy the publisher. */
        if(NULL != impl->mPublisher)
        {
            mamaPublisher_destroy(impl->mPublisher);
        }

        /* Destroy the subscription. */
        if(NULL != impl->mSubscription)
        {
            mamaSubscription_destroy(impl->mSubscription);
            mamaSubscription_deallocate(impl->mSubscription);
        }

        /* Destroy the inbox. */
        if(NULL != impl->mInbox)
        {
            mamaInbox_destroy(impl->mInbox);
        }

        /* Destroy the re-usable messages. */
        if(NULL != impl->mRefreshResponseMsg)
        {
            mamaMsg_destroy(impl->mRefreshResponseMsg);
        }
        if(NULL != impl->mNoSubscribersMsg)
        {
            mamaMsg_destroy(impl->mNoSubscribersMsg);
        }
        if(NULL != impl->mSyncRequestMsg)
        {
            mamaMsg_destroy(impl->mSyncRequestMsg);
        }

        /* Free the namespace. */
        if(NULL != impl->mNameSpace)
        {
            free(impl->mNameSpace);
        }

        /* Destroy the publisher table. */
        if(NULL != impl->mPublisherMap)
        {
            wtable_destroy ( impl->mPublisherMap );
        }

        /* Free the impl itself. */
        free(impl);
    }
}
void destroyStatsCache(statsCache* sCache)
{
    if (sCache)
    {
        if (sCache->mPData)
        {
            free (sCache->mPData);
        }
        if (sCache->mSymbolTable)
        {
            wtable_destroy (sCache->mSymbolTable);
        }
        free (sCache);
    }
}