Function CSPPool<T>::Get()
Description:
Retrieves a pooled object.
 |
Prototype:
void Get(CSPPool<T>::ObjectPtr& spObject);
Arguments:
- CSPPool<T>::ObjectPtr& spObject [OUT]
The smart pointer to a pooled object.
Return value:
No return value (void).
Remarks:
This member function, if there is no available object when it's called, waits until the first object is available. This normally happens when another thread returns an object to the pool.
Examples:
CSPPool<CSPString> Pool; Pool.Add( "Hello", 10 ); ... CSPPool<CSPString>::ObjectPtr spString;
Pool.Get( spString ); CSPString& strString = *sp; Response.Write( strString );
sp.Release();
See also:
member functions Add( T* ), Add( const T&, unsigned long ), AddNew()
|
|