go/src/regexp
Oleg Bulatov 7263540146 regexp: Regexp shouldn't keep references to inputs
If you try to find something in a slice of bytes using a Regexp object,
the byte array will not be released by GC until you use the Regexp object
on another slice of bytes. It happens because the Regexp object keep
references to the input data in its cache.

Change-Id: I873107f15c1900aa53ccae5d29dbc885b9562808
Reviewed-on: https://go-review.googlesource.com/96715
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-02-23 16:58:48 +00:00
..
syntax regexp/syntax: make Op an fmt.Stringer 2018-02-20 15:33:50 +00:00
testdata
all_test.go regexp: don't allocate when All methods find no matches 2018-02-13 18:44:40 +00:00
backtrack.go regexp: make (*bitState).push inlinable 2017-09-25 19:34:26 +00:00
example_test.go regexp: examples for Regexp.Expand and Regexp.ExpandString functions 2017-08-28 15:34:19 +00:00
exec.go all: unindent some if bodies by exiting early 2017-10-31 20:07:46 +00:00
exec2_test.go
exec_test.go all: revert "all: prefer strings.IndexByte over strings.Index" 2017-10-05 23:19:10 +00:00
find_test.go
onepass.go regexp: remove redundant break 2017-04-25 15:00:06 +00:00
onepass_test.go regexp: reduce allocations at onePassCopy 2017-03-28 17:58:10 +00:00
regexp.go regexp: Regexp shouldn't keep references to inputs 2018-02-23 16:58:48 +00:00