Skip to content

Commit f478161

Browse files
committed
minor symfony#22367 [Yaml] release memory after parsing (xabbuh)
This PR was merged into the 2.7 branch. Discussion ---------- [Yaml] release memory after parsing | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#22351 (comment) | License | MIT | Doc PR | Follow up of symfony#22351 to release memory after parsing as suggested by @stof. Commits ------- c891413 [Yaml] release memory after parsing
2 parents f8e1098 + c891413 commit f478161

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Symfony/Component/Yaml/Parser.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ public function parse($value, $exceptionOnInvalidType = false, $objectSupport =
8686
mb_internal_encoding($mbEncoding);
8787
}
8888

89+
$this->lines = array();
90+
$this->currentLine = '';
91+
$this->refs = array();
92+
$this->skippedLineNumbers = array();
93+
$this->locallySkippedLineNumbers = array();
94+
8995
if (null !== $e) {
9096
throw $e;
9197
}

0 commit comments

Comments
 (0)