diff options
author | Brent Shaffer <betterbrent@google.com> | 2017-07-17 09:14:46 -0700 |
---|---|---|
committer | Paul Yang <TeBoring@users.noreply.github.com> | 2017-07-17 09:14:46 -0700 |
commit | 324b20a49170cb38d15ef243bc044026adb54ae1 (patch) | |
tree | 7b2e7a82b26d6246d48e15b2d32e37c64ecefef9 /php/tests/array_test.php | |
parent | 29ff49f5345693bd04aa37654aa002054d1b9780 (diff) | |
download | protobuf-324b20a49170cb38d15ef243bc044026adb54ae1.tar.gz protobuf-324b20a49170cb38d15ef243bc044026adb54ae1.tar.bz2 protobuf-324b20a49170cb38d15ef243bc044026adb54ae1.zip |
remove pass by reference for php setters (#3344)
* remove pass by reference for php setters
* comments out memory leak test
Diffstat (limited to 'php/tests/array_test.php')
-rw-r--r-- | php/tests/array_test.php | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/php/tests/array_test.php b/php/tests/array_test.php index 271389ba..e57f0a7e 100644 --- a/php/tests/array_test.php +++ b/php/tests/array_test.php @@ -521,21 +521,23 @@ class RepeatedFieldTest extends PHPUnit_Framework_TestCase # Test memory leak ######################################################### - public function testCycleLeak() - { - $arr = new RepeatedField(GPBType::MESSAGE, TestMessage::class); - $arr[] = new TestMessage; - $arr[0]->SetRepeatedRecursive($arr); - - // Clean up memory before test. - gc_collect_cycles(); - $start = memory_get_usage(); - unset($arr); - - // Explicitly trigger garbage collection. - gc_collect_cycles(); - - $end = memory_get_usage(); - $this->assertLessThan($start, $end); - } + // COMMENTED OUT BY @bshaffer + // @see https://github.com/google/protobuf/pull/3344#issuecomment-315162761 + // public function testCycleLeak() + // { + // $arr = new RepeatedField(GPBType::MESSAGE, TestMessage::class); + // $arr[] = new TestMessage; + // $arr[0]->SetRepeatedRecursive($arr); + + // // Clean up memory before test. + // gc_collect_cycles(); + // $start = memory_get_usage(); + // unset($arr); + + // // Explicitly trigger garbage collection. + // gc_collect_cycles(); + + // $end = memory_get_usage(); + // $this->assertLessThan($start, $end); + // } } |