fix(ivy): LFrame needs to release memory on leaveView() (#35156)

Root cause is that for perf reasons we cache `LFrame` so that we don't have to allocate it all the time. To be extra fast we clear the `LFrame` on `enterView()` rather that on `leaveView()`. The implication of this strategy is that the deepest `LFrame` will retain objects until the `LFrame` allocation depth matches the deepest object.

The fix is to simply clear the `LFrame` on `leaveView()` rather then on `enterView()`

Fix #35148

PR Close #35156
This commit is contained in:
Misko Hevery
2020-02-04 21:41:49 -08:00
committed by Alex Rickabaugh
parent 4f8d30361a
commit 4b1dcaf0f5
5 changed files with 73 additions and 37 deletions

View File

@ -3,7 +3,7 @@
"master": {
"uncompressed": {
"runtime-es2015": 1485,
"main-es2015": 141000,
"main-es2015": 141569,
"polyfills-es2015": 36657
}
}
@ -12,7 +12,7 @@
"master": {
"uncompressed": {
"runtime-es2015": 1485,
"main-es2015": 16312,
"main-es2015": 16514,
"polyfills-es2015": 36657
}
}
@ -21,7 +21,7 @@
"master": {
"uncompressed": {
"runtime-es2015": 1485,
"main-es2015": 147082,
"main-es2015": 147647,
"polyfills-es2015": 36657
}
}
@ -30,7 +30,7 @@
"master": {
"uncompressed": {
"runtime-es2015": 1485,
"main-es2015": 136250,
"main-es2015": 136777,
"polyfills-es2015": 37334
}
}
@ -39,7 +39,7 @@
"master": {
"uncompressed": {
"runtime-es2015": 2289,
"main-es2015": 246583,
"main-es2015": 247198,
"polyfills-es2015": 36657,
"5-es2015": 751
}
@ -49,7 +49,7 @@
"master": {
"uncompressed": {
"runtime-es2015": 2289,
"main-es2015": 225584,
"main-es2015": 226144,
"polyfills-es2015": 36657,
"5-es2015": 779
}