Logo Search packages:      
Sourcecode: maxdb-7.5.00 version File versions

void sqltlsfreememory ( int  key  ) 

Releases thread-local memory attached to a key.

Definition at line 449 of file IFRUtil_Tls.cpp.

References tls_memchunk::memory, sqlgettls(), and sqlonce().

    {
        if(key <0 || key>=IFR_TLSINDEX_MAX) {
            return;
        }
        
        sqlonce(&tls_initialised, 
                allocate_tls,
                &tls_init_successfully);
        if(!tls_init_successfully) {
            return;
        }
        void *handle=sqlgettls(tls_key);

        if(handle == 0) {
            return;
        } 
        tls_memchunk *chunk=(tls_memchunk*) handle;

        if(chunk->memory[key]) {
            char *todel=(char *) chunk->memory[key];
            sqlfree((tsp00_Uint1*)todel);
        }
        
        return;
    }


Generated by  Doxygen 1.6.0   Back to index