From 6307f413069743d5b3faeac5c57c93341205bc52 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 15 Aug 2013 16:00:19 +0200 Subject: [PATCH] [HttpKernel] removed a circular reference that prevents PHP GC to do its job --- src/Symfony/Component/HttpKernel/Bundle/Bundle.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Bundle/Bundle.php b/src/Symfony/Component/HttpKernel/Bundle/Bundle.php index d38ba14f17..0608f13bab 100644 --- a/src/Symfony/Component/HttpKernel/Bundle/Bundle.php +++ b/src/Symfony/Component/HttpKernel/Bundle/Bundle.php @@ -29,8 +29,8 @@ use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; abstract class Bundle extends ContainerAware implements BundleInterface { protected $name; - protected $reflected; protected $extension; + protected $path; /** * Boots the Bundle. @@ -123,11 +123,12 @@ abstract class Bundle extends ContainerAware implements BundleInterface */ public function getPath() { - if (null === $this->reflected) { - $this->reflected = new \ReflectionObject($this); + if (null === $this->path) { + $reflected = new \ReflectionObject($this); + $this->path = dirname($reflected->getFileName()); } - return dirname($this->reflected->getFileName()); + return $this->path; } /**