Logo Search packages:      
Sourcecode: icu version File versions  Download package

U_STABLE void U_EXPORT2 ubidi_close ( UBiDi pBiDi  ) 

ubidi_close() must be called to free the memory associated with a UBiDi object.

Important: A parent UBiDi object must not be destroyed or reused if it still has children. If a UBiDi object has become the child of another one (its parent) by calling ubidi_setLine(), then the child object must be destroyed (closed) or reused (by calling ubidi_setPara() or ubidi_setLine()) before the parent object.

Parameters:
pBiDi is a UBiDi object.
See also:
ubidi_setPara

ubidi_setLine ICU 2.0

Definition at line 237 of file ubidi.c.

References NULL.

                          {
    if(pBiDi!=NULL) {
        pBiDi->pParaBiDi=NULL;          /* in case one tries to reuse this block */
        if(pBiDi->dirPropsMemory!=NULL) {
            uprv_free(pBiDi->dirPropsMemory);
        }
        if(pBiDi->levelsMemory!=NULL) {
            uprv_free(pBiDi->levelsMemory);
        }
        if(pBiDi->runsMemory!=NULL) {
            uprv_free(pBiDi->runsMemory);
        }
        if(pBiDi->parasMemory!=NULL) {
            uprv_free(pBiDi->parasMemory);
        }
        if(pBiDi->insertPoints.points!=NULL) {
            uprv_free(pBiDi->insertPoints.points);
        }

        uprv_free(pBiDi);
    }
}


Generated by  Doxygen 1.6.0   Back to index