ustring dtor



I took a peek at the ustring source code. A ustring is stored like this:

std::string string_;

And this is the the ustring dtor:

ustring::~ustring()
{}

Note that it is an empty function.

I have a question, just for my own education, as I am a beginner in C++.

Why wasn't the dtor defined instead like below?

ustring::~ustring()
{string_.clear()}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]