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

Developer

API Reference

IRSCPOOL_HOLDRSC()

Brew Release
Brew MP 1.0.2
See Also
IRscPool_ReleaseRsc()
Description
Associates a generic IBase pointer with the lifetime of an IRscPool
Params
po
[]:
Pointer to the IRscPool object
pRsc
[]:
Thing to keep track of
Interface
Prototype
  •    int IRscPool_HoldRsc(IRscPool *po, IBase *pRsc);
    
Return
  • SUCCESS: if pResource is successfully added to the pool ENOMEMORY: if memory could not be allocated to hold the resource
Side Effect
  • None
Comments
IRscPool does not call IBase_AddRef() on pResource. For this reason, the caller should not call IBase_Release() on pResource without first calling IRscPool_ReleaseRsc(). The caller is freed from the responsibility of releasing pResource. IRscPool will call IBase_Release() on pResource when the IRscPool is destroyed (unless IRscPool_ReleaseRsc() is called), accomplishing clean-up of pResource.