StrBuf::~StrBuf() (Destructor)
Destroy a StrBuf
.
Virtual? |
No |
|
Class |
||
Arguments |
None |
|
Returns |
N/A |
Notes
The StrBuf
destructor destroys a StrBuf
.
If the buffer
points to allocated memory other than
nullStrBuf
, the allocated memory is freed.
Example
#include <iostream> #include <stdhdrs.h> #include <strbuf.h> int main( int argc, char **argv ) { StrBuf *psb; psb = new StrBuf; psb->Set( "xyz" ); cout <<→ " << psb->Text() << "\"\n"; delete psb; // destructor called and allocated memory freed }
Executing the preceding code produces the following output:
psb->Text() returns "xyz"