mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
builtin: zero out internal map/array pointers on m.free(), to reduce the work for the GC mark phase for non escaping maps/arrays, used in hot loops (#18415)
This commit is contained in:
@ -1838,6 +1838,7 @@ pub fn (s &string) free() {
|
||||
unsafe {
|
||||
// C.printf(c's: %x %s\n', s.str, s.str)
|
||||
free(s.str)
|
||||
s.str = nil
|
||||
}
|
||||
s.is_lit = -98761234
|
||||
}
|
||||
|
Reference in New Issue
Block a user