| 79 | static std::map<Regexp*, int>* ref_map; |
| 80 | |
| 81 | int Regexp::Ref() { |
| 82 | if (ref_ < kMaxRef) |
| 83 | return ref_; |
| 84 | |
| 85 | MutexLock l(ref_mutex); |
| 86 | return (*ref_map)[this]; |
| 87 | } |
| 88 | |
| 89 | // Increments reference count, returns object as convenience. |
| 90 | Regexp* Regexp::Incref() { |