diff --git a/proposal-template.md b/proposal-template.md index c928a70..672201b 100755 --- a/proposal-template.md +++ b/proposal-template.md @@ -1,16 +1,24 @@ -# ECMAScript proposal: @Name +# ECMAScript proposal: Unoptimized Strings - [Motivation](#motivation) - [High-level API](#high-level-api) - [FAQ](#faq) ## Motivation -Proposal motivation +https://habr.com/ru/post/449368/ +Because V8 store `slice` target string we could get a memory leak with a lot of string storing. +To prevent it we should use hacks like to prevent storing string inside V8: + +```js +const str = oldStr.split("").join(""); +``` + +I propose to create constructor which will prevent any storing of string in V8 ## High-level API ```js -// example code +const str = String.unoptimizedFrom("test") ``` ### FAQ