added a comment to HawkStd::SourceString::close()

This commit is contained in:
hyung-hwan 2021-08-19 20:17:17 +00:00
parent c99610cecc
commit ccd2ce2297

View File

@ -1483,6 +1483,9 @@ int HawkStd::SourceString::close (Data& io)
{
if (io.isMaster())
{
// free the resources and nullify this->_hawk in particular
// to prevent this object from outliving the hawk instance pointed to
// by this->_hawk.
HAWK_ASSERT (this->_hawk != HAWK_NULL);
HAWK_ASSERT (this->str != HAWK_NULL);
hawk_freemem (this->_hawk, this->str);