zeusdeux / re2

Automatically exported from code.google.com/p/re2
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Could pattern_ be erased? #28

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It seems the member "std::string pattern_" is only used by the pattern() 
method, logging errors when compiling the regexp, and for logging info when 
FLAGS_trace_re2 is set. FLAGS_trace_re2 is local to re2.cc and is set to false 
in the current release.  Whenever pattern_ is used for an error message or a 
log it is truncated to 100 characters.

Would it be possible to have a method or an option to erase pattern_ (or at 
least trim it to 100 characters) after construction?

Original issue reported on code.google.com by rmi...@gmail.com on 6 Aug 2010 at 12:50

GoogleCodeExporter commented 9 years ago
I suppose, but it seems like the memory occupied by
pattern_ is unlikely to be close to a significant 
fraction of the total memory used by an RE2 object.
What is the context here?

Original comment by rsc@golang.org on 6 Aug 2010 at 5:38

GoogleCodeExporter commented 9 years ago

Original comment by rsc@golang.org on 10 Jan 2014 at 1:10