MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / ~Regexp

Method ~Regexp

extern/re2/re2/regexp.cc:46–65  ·  view source on GitHub ↗

Destructor. Assumes already cleaned up children. Private: use Decref() instead of delete to destroy Regexps. Can't call Decref on the sub-Regexps here because that could cause arbitrarily deep recursion, so required Decref() to have handled them for us.

Source from the content-addressed store, hash-verified

44// that could cause arbitrarily deep recursion, so
45// required Decref() to have handled them for us.
46Regexp::~Regexp() {
47 if (nsub_ > 0)
48 LOG(DFATAL) << "Regexp not destroyed.";
49
50 switch (op_) {
51 default:
52 break;
53 case kRegexpCapture:
54 delete name_;
55 break;
56 case kRegexpLiteralString:
57 delete[] runes_;
58 break;
59 case kRegexpCharClass:
60 if (cc_)
61 cc_->Delete();
62 delete ccb_;
63 break;
64 }
65}
66
67// If it's possible to destroy this regexp without recurring,
68// do so and return true. Else return false.

Callers

nothing calls this directly

Calls 1

DeleteMethod · 0.45

Tested by

no test coverage detected