Skip to content

Commit 6307f41

Browse files
committed
[HttpKernel] removed a circular reference that prevents PHP GC to do its job
1 parent 49fe3c7 commit 6307f41

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/Symfony/Component/HttpKernel/Bundle/Bundle.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
abstract class Bundle extends ContainerAware implements BundleInterface
3030
{
3131
protected $name;
32-
protected $reflected;
3332
protected $extension;
33+
protected $path;
3434

3535
/**
3636
* Boots the Bundle.
@@ -123,11 +123,12 @@ public function getNamespace()
123123
*/
124124
public function getPath()
125125
{
126-
if (null === $this->reflected) {
127-
$this->reflected = new \ReflectionObject($this);
126+
if (null === $this->path) {
127+
$reflected = new \ReflectionObject($this);
128+
$this->path = dirname($reflected->getFileName());
128129
}
129130

130-
return dirname($this->reflected->getFileName());
131+
return $this->path;
131132
}
132133

133134
/**

0 commit comments

Comments
 (0)