API Reference | developer.brewmp.com API Reference | developer.brewmp.com


API Reference


Brew Release
Brew MP 1.0.2
See Also
Model Events ListModelEvent IVectorModel Interface IVectorModel_SetPfnFree()
This function deletes all of the items stored in a vector model, releasing the memory referenced by each of the item pointers, removing all of the pointers from the model's array of item pointers, and setting the size of the vector model to 0 (zero).
Pointer to the IVectorModel interface object.
  •    void IVectorModel_DeleteAll(IVectorModel *po);
  • None
Side Effect
  • Deleting the items in a vector model by calling IVectorModel_DeleteAll() will cause BREW to send an EVT_MDL_LIST_CHANGE ListModelEvent to any object that has registered as a listener with the model.
    The fields of the ListModelEvent will contain the following information:
           pos:      0
           oldSize:  The number of items in the vector model before calling IVectorModel_DeleteAll().
           newSize:  0 (since there are now no more items in the vector model)
The vector model may define a custom free memory routine to release the memory consumed by complex items. The custom free memory routine is registered with the vector model by calling IVectorModel_SetPfnFree() and will be called for each item stored in the vector model when issuing IVectorModel_DeleteAll().