Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

C/C++ API Documentation | 2025.2

# StrBuf::~StrBuf() (Destructor)

Destroy a `StrBuf`.

Virtual? | No |
Class | `StrBuf` |
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

Copy

    #include &lt;iostream&gt;

    #include &lt;stdhdrs.h&gt;
    #include &lt;strbuf.h&gt;

    int main( int argc, char **argv )
    {
        StrBuf *psb;
        psb = new StrBuf;
        psb-&gt;Set( "xyz" );
        cout &lt;&lt; psb- → Text() returns \" &lt;&lt; psb-&gt;Text() &lt;&lt; "\"\n";
        delete psb;   // destructor called and allocated memory freed
    }

Executing the preceding code produces the following output:

    psb->Text() returns "xyz"

Your search for returned results